1.本地镜像导入,已经修改好并打包的镜像导入
cat apache-tomcat-9.0.37.tar.gz | docker import - tomcat:9.0
2.docker 修改镜像后,制作镜像
docker exec -it a30a7b7b297e /bin/bash
docker cp /home/server.xml a30a7b7b297e:/usr/local/tomcat/conf/
docker cp /home/lims.war a30a7b7b297e:/usr/local/tomcat/webapps/
or docker cp -r /home/lims a30a7b7b297e:/usr/local/tomcat/webapps/
docker commit –m “modify webapps” –a “conan” a30a7b7b297e limstomcat
3.dockerfile文件自动生成
FROM redhat7.3
RUN yum install wget
&& wget -O tomcat-9.0.37.tar.gz “https://mirror.bit.edu.cn/apache/tomcat/tomcat-9/v9.0.37/bin/apache-tomcat-9.0.37.tar.gz”
&& tar -zxvf tomcat-9.0.37.tar.gz \