1.拉取镜像
docker pull tomcat
2.启动image,先建立目录:/data/tomacat/ 及下级目录
docker run -itd --name tomcat -p 8080:8080 -e TZ="Asia/Shanghai" -m 2G -v /data/tomcat/webapps:/usr/local/tomcat/webapps -v /home/tomcat/logs:/usr/local/tomcat/logs -v /home/tomcat/temp:/usr/local/tomcat/temp -v /home/tomcat/work:/usr/local/tomcat/work docker.io/tomcat:latest
3.进入镜像,复制文件
docker exec -it tomcat /bin/bash mv webapps.dist/* webapps
标签:tomcat,部署,webapps,usr,home,docker,local From: https://www.cnblogs.com/hillman01/p/17287712.html