问题:
编写了dockerfile,然后通过dockerfile构建镜像,构建的镜像生成容器,然后启动
1.FROM centos:7 MAINTAINER www.zenghw.com ENV VERSION=8.5.47 RUN yum install java-1.8.0-openjdk wget curl unzip iproute net-tools -y && \ yum clean all && \ rm -rf /var/cache/yum/* COPY apache-tomcat-8.5.47.zip /tmp RUN cd /tmp && \ unzip apache-tomcat-8.5.47.zip && \ mv apache-tomcat-8.5.47 /usr/local/tomcat8 && \ rm -rf apache-tomcat-8.5.47.zip && \ cd /usr/local/tomcat8/bin/ && \ chmod +x *.sh && \ sed -i '1a JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom"' /usr/local/tomcat8/bin/catalina.sh && \ ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime ENV PATH $PATH:/usr/local/tomcat8/bin WORKDIR /usr/local/tomcat8 EXPOSE 8080 CMD ["/usr/local/tomcat8/bin/catalina.sh", "run"]