84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
我是docker初学者,在window环境下使用docker根据《第一本Docker书》学习,学习到docker端口映射这里使用了docker port 查看了端口映射是映射到0.0.0.0:32769这个端口
如果是curl localhost:32769正常的情况反应是:有我自己打的一些英文出现的。
-p 80使用不对,应该是-p 8080:80。将本地端口与容器端口进行映射。然后本地访问localhost:8080即可。如果让docker自动分配端口应使用大写P,-PNo need to add the port number afterwards.
-p 80
-p 8080:80
-P
There is a problem with your port. It is only bound to the port of the container, which should be -p 80:80
-p 80
使用不对,应该是-p 8080:80
。将本地端口与容器端口进行映射。然后本地访问localhost:8080即可。如果让docker自动分配端口应使用大写P,-P
No 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