Dockerfile生成自定义Tomcat镜像

FROM ip:port/tomcat_image:version
MAINTAINER xxxx

#copy tomcat scripts into image
COPY ./scripts/catalina.sh   	/usr/local/apache-tomcat/bin/
COPY ./scripts/setenv.sh   	    /usr/local/apache-tomcat/bin/
COPY ./scripts/startserver.sh   /root/
COPY ./wars/*.war		        /usr/local/apache-tomcat/webapps/
COPY ./wars/ch_resource		    /usr/local/apache-tomcat/webapps/ch_resource
COPY ./conf/*                   /usr/local/apache-tomcat/chaohiconf/

#set environment variable
ENV LC_ALL 	zh_CN.utf8
ENV JAVA_HOME	/usr/local/java/jdk1.8.0_144
ENV JRE_HOME 	$JAVA_HOME/jre
ENV CLASSPATH 	.:$CLASSPATH:$JAVA_HOME/lib:$JRE_HOME/lib
ENV PATH 	$JAVA_HOME/bin:$PATH

#define entry point which will be run first when the container starts up
#ENTRYPOINT /usr/local/apache-tomcat/bin/catalina.sh run
CMD ["/root/startserver.sh"]

 

你可能感兴趣的:(服务器)