In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article focuses on "how to build a sun jdk 8 docker image based on tomcat 8 image". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to build a sun jdk 8 docker image based on tomcat 8 image.
FROM myimage/alpine_glibc_jdk:8MAINTAINER tongqiangENV TOMCAT_MAJOR 8ENV TOMCAT_VERSION 8.5.23ENV CATALINA_HOME/ usr/local/tomcatENV PATH $CATALINA_HOME/bin:$PATHENV TOMCAT_NATIVE_LIBDIR $CATALINA_HOME/native-jni-libENV LD_LIBRARY_PATH ${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:} $TOMCAT_NATIVE_LIBDIRENV TOMCAT_TGZ_URL http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-${TOMCAT_MAJOR}/v${TOMCAT_VERSION}/bin/ Apache-tomcat-$ {TOMCAT_VERSION} .tar.gzRun apk add-no-cache-virtual. Build-deps\ ca-certificates\ tar\ wget\ openssl\ openssl-dev\ apr-dev\ coreutils\ dpkg-dev dpkg\ gcc\ libc-dev\ make & & mkdir-p ${CATALINA_HOME} \ & & wget-O tomcat.tar.gz ${TOMCAT_TGZ_URL}\ & & tar-xvf tomcat.tar.gz-C ${CATALINA_HOME}-- strip-components=1\ & & nativeBuildDir=$ (mktemp-d)\ & tar-xvf ${CATALINA_HOME} / bin/tomcat-native.tar.gz-C ${nativeBuildDir}-strip-components=1\ & & (cd ${nativeBuildDir} / native\ & gnuArch=$ (dpkg-) Architecture-query DEB_BUILD_GNU_TYPE)\ & &. / configure\-build=$ {gnuArch}\-libdir=$ {TOMCAT_NATIVE_LIBDIR}\-prefix=$ {CATALINA_HOME}\-with-apr=$ (which apr-1-config)\-with-java-home=$ {JAVA_HOME}\-with-ssl=yes\ & & make-j $ (nproc)\ & make install)\ & & runDeps=$ (\ scanelf-- needed-- nobanner-- recursive ${TOMCAT_NATIVE_LIBDIR}\ | awk'{gsub (/ /, "\ nso:", $2) Print "so:" $2}'\ | sort-u\ | xargs-r apk info-installed\ | sort-u\)\ & & apk add-- virtual .tomcat-native-rundeps ${runDeps}\ & & nativeLines=$ (catalina.sh configtest 2 > & 1)\ & & nativeLines=$ (echo ${nativeLines} | grep 'Apache Tomcat Native')\ & nativeLines=$ (echo) ${nativeLines} | sort-u)\ & & if! Echo ${nativeLines} | grep 'INFO: Loaded APR based Apache Tomcat Native library' > & 2; then\ echo > & 2 ${nativeLines};\ exit 1 \ fi\ & & apk del. Build-deps\ & & rm-rf ${CATALINA_HOME} / bin/*.bat\ ${CATALINA_HOME} / bin/tomcat-native.tar.gz\ ${CATALINA_HOME} / webapps/*\ tomcat.tar.gz EXPOSE 8080CMD ["catalina.sh", "run"]
The build command is as follows:
Docker build-t alpine-sunjdk8-tomcat:8. At this point, I believe you have a deeper understanding of "how to build a tomcat 8 docker image based on sun jdk 8 image". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.