如何解决docker访问页面出错
时间:2020-06-05 15:41
如何解决docker访问页面出错?
创建容器
(django31) pyvip@VIP:~$ docker container start test test (django31) pyvip@VIP:~$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES bf38f67f54fb tomcat "catalina.sh run" 15 minutes ago Up 15 minutes 0.0.0.0:9999->8080/tcp demo e6401b123eb8 tomcat "catalina.sh run" 20 minutes ago Up 4 seconds 0.0.0.0:8080->8080/tcp test
进入 /bin/bash 查看
(django31) pyvip@VIP:~$ docker exec -it bf38 /bin/bash root@bf38f67f54fb:/usr/local/tomcat# ls BUILDING.txt LICENSE README.md RUNNING.txt conf lib native-jni-lib webapps work CONTRIBUTING.md NOTICE RELEASE-NOTES bin include logs temp webapps.dist
进入webapps文件下查看是否有文件,这里没有,所以我删了,查看webapps.dist
root@bf38f67f54fb:/usr/local/tomcat# cd webapps root@bf38f67f54fb:/usr/local/tomcat/webapps# ls root@bf38f67f54fb:/usr/local/tomcat/webapps# rm -r webapps rm: cannot remove 'webapps': No such file or directory
复制一份,
root@bf38f67f54fb:/usr/local/tomcat# rm -r webapps root@bf38f67f54fb:/usr/local/tomcat# ls BUILDING.txt LICENSE README.md RUNNING.txt conf lib native-jni-lib webapps.dist CONTRIBUTING.md NOTICE RELEASE-NOTES bin include logs temp work root@bf38f67f54fb:/usr/local/tomcat# cp -r webapps.dist/ webapps root@bf38f67f54fb:/usr/local/tomcat# ls BUILDING.txt LICENSE README.md RUNNING.txt conf lib native-jni-lib webapps work CONTRIBUTING.md NOTICE RELEASE-NOTES bin include logs temp webapps.dist
ok,重新访问,
以上就是如何解决docker访问页面出错的详细内容,更多请关注gxlcms其它相关文章!