问题现象:
启动Tomcat容器后,访问8080主页并提示您输入404
原因:默认Tomcat容器内主页信息为空,需要手动添加
解决方法:添加主页信息
1、在容器里。
docker exec-it a 8 aa 85 a 3366 e/bin/bash 2,查看并添加主页信息
root @ a 8 aa 85 a 3366 e :/usr/local/Tomcat # ls
building . txt contributing . MD license notice readme . MD release-notes running . txt bin conf lib logs native-JNI-;
root @ a 8 aa 85 a 3366 e :/usr/local/Tomcat # ls查看webapps # # # # #主页信息(空)
root @ a 8 aa 85 a 3366 e :/usr/local/Tomcat # lsw EBA/
root docs examples host-manager manager
root @ a 8 aa 85 a 3366 e :/usr/local/Tomcat # mv web apps web apps-bak # # #备份主页信息
root @ a 8 aa 85 a 3366 e :/usr/local/Tomcat # mvweba/web apps # # # #添加主页信息
root @ a 8 aa 85 a 3366 e :/usr/local/Tomcat # 3,重新访问页面,标记正常