转载:https://blog.csdn.net/javahighness/article/details/82859596
1进入容器
docker exec -it mytomcat bash
以root用户进入
docker exec -it --user root b95b0d2d9b1b bash
2找到tomcat webapps路径 /usr/local/tomcat/webapps
3将宿主dome.war包发送到容器webapps路径下
docker cp demo.war mytomcat:/usr/local/tomcat/webapps
4重启容器
docker restart mytomcat