docker绑定了nginx端口 外部访问不到
仅有的幸福
仅有的幸福 2017-04-26 09:01:50
0
2
639

我是docker初学者,在window环境下使用docker
根据《第一本Docker书》学习,学习到docker端口映射这里
使用了docker port 查看了端口映射是映射到0.0.0.0:32769这个端口

如果是curl localhost:32769
正常的情况反应是:有我自己打的一些英文出现的。

仅有的幸福
仅有的幸福

reply all(2)
巴扎黑

-p 80使用不对,应该是-p 8080:80。将本地端口与容器端口进行映射。然后本地访问localhost:8080即可。如果让docker自动分配端口应使用大写P,-PNo need to add the port number afterwards.

習慣沉默

There is a problem with your port. It is only bound to the port of the container, which should be -p 80:80

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!