使用Docker教程,我被困在这部分:https://docs.docker.com/get-started/part3/#run-your-new-load-balanced-app
我使用curl -4 http://localhost,但得到了一个curl: (7) Failed to connect to localhost port 80: Connection refused错误。
上一步的输出:docker service ps getstartedlab_web
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
kqu5qggifnlm getstartedlab_web.1 s1mpl3/get-started:part2 moby Running Running 29 minutes ago
prhrmm6hpop3 getstartedlab_web.2 s1mpl3/get-started:part2 moby Running Running 29 minutes ago
ytrwy5gxp2rk getstartedlab_web.3 s1mpl3/get-started:part2 moby Running Running 29 minutes ago
mayvauijghbj getstartedlab_web.4 s1mpl3/get-started:part2 moby Running Running 29 minutes ago
r625x2k7n6ta getstartedlab_web.5 s1mpl3/get-started:part2 moby Running Running 29 minutes ago 所以error和ports是空的。
我应该分析什么来解决这个问题?
发布于 2017-11-06 17:27:22
对于第4部分,当您部署到群集时,您将得到一个带有docker-machine ls的URL。
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
myvm1 * virtualbox Running tcp://192.168.99.100:2376 v17.10.0-ce
myvm2 - virtualbox Running tcp://192.168.99.101:2376 v17.10.0-ce 将docker-compose.yml文件80:80更改为4000:80
使用192.168.99.100:4000,它应该是工作的。
https://stackoverflow.com/questions/47139364
复制相似问题