Dockerfile 构建 tomcat 镜像
【代码】Dockerfile 构建 tomcat 镜像。
·
Dockerfile 构建 tomcat 镜像
FROM centos:7
MAINTAINER lihaozhe<646269678@qq.com>
RUN yum -y install vim tar net-tools
ADD jdk-8u371-linux-x64.tar.gz /usr/local
ADD apache-tomcat-9.0.75.tar.gz /usr/local
ENV JAVA_HOME /usr/local/jdk1.8.0_371
ENV CATALINA_HOME /usr/local/apache-tomcat-9.0.75
ENV CATALINA_BASE $CATALINA_HOME
ENV PATH $PATH:$JAVA_HOME/bin:$CATALINA_HOME/lib:$CATALINA_HOME/bin
ENV TZ="Asia/Shanghai"
EXPOSE 8080
CMD /usr/local/apache-tomcat-9.0.75/bin/startup.sh
sudo docker build -t tomcat9 .
sudo docker run --name my_tomcat -p 8080:8080 -d tomcat9
更多推荐
已为社区贡献5条内容
所有评论(0)