[root@localhost ~]# docker exec -it mytomcat /bin/bash
root@020c28055968:/usr/local/tomcat# ls
LICENSE RELEASE-NOTES bin include logs temp work
NOTICE RUNNING.txt conf lib native-jni-lib webapps
root@020c28055968:/usr/local/tomcat# exit
exit
[root@localhost ~]# docker cp DockerDemo.war mytomcat:/usr/local/tomcat/webapps
[root@localhost ~]#
3、tomcat 会自动热部署,直接访问 Web 应用的路径即可。
Linux公社的RSS地址:https://www.linuxidc.com/rssFeed.aspx