美文网首页
自建tomcat镜像

自建tomcat镜像

作者: _浅陌 | 来源:发表于2019-08-13 10:28 被阅读0次

文件夹结构如下:

Dockerfile文件内容:

FROM openjdk:8-jdk

ENV CATALINA_HOME /usr/local/tomcat

ENV PATH $CATALINA_HOME/bin:$PATH

RUN mkdir -p "$CATALINA_HOME"

COPY tomcat /usr/local/tomcat/

#时区

RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone

WORKDIR $CATALINA_HOME

# let "Tomcat Native" live somewhere isolated

ENV TOMCAT_NATIVE_LIBDIR $CATALINA_HOME/native-jni-lib

ENV LD_LIBRARY_PATH ${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$TOMCAT_NATIVE_LIBDIR

# see https://www.apache.org/dist/tomcat/tomcat-$TOMCAT_MAJOR/KEYS

# see also "update.sh" (https://github.com/docker-library/tomcat/blob/master/update.sh)

ENV GPG_KEYS 05AB33110949707C93A279E3D3EFE6B686867BA6 07E48665A34DCAFAE522E5E6266191C37C037D42 47309207D818FFD8DCD3F83F1931D684307A10A5 541FBE7D8F78B25E055DDEE13C370389288584E7 61B832AC2F1C5A90F0F9B00A1C506407564C17A3 713DA88BE50911535FE716F5208B0AB1D63011C7 79F7026C690BAA50B92CD8B66A3AD3F4F22C4FED 9BA44C2621385CB966EBA586F72C284D731FABEE A27677289986DB50844682F8ACB77FC2E86E29AC A9C5DF4D22E99998D9875A5110C01C5A2F6059E7 DCFD35E0BF8CA7344752DE8B6FB21E8933C60243 F3A04C595DB5B6A5F1ECA43E3B7BBB100D811BBE F7DA48BB64BCB84ECBA7EE6935CD23C10D498E23

#COPY tomcat /usr/local/tomcat/

# fix permissions (especially for running as non-root)

# https://github.com/docker-library/tomcat/issues/35

RUN chmod -R +rX .; \

chmod 777 logs work bin

#RUN echo $PATH

#RUN pwd

EXPOSE 8080

CMD ["catalina.sh", "run"]

相关文章

网友评论

      本文标题:自建tomcat镜像

      本文链接:https://www.haomeiwen.com/subject/soqvjctx.html