【发布时间】:2018-09-12 20:33:56
【问题描述】:
当我为侦听端口 8090 的 Web 应用程序运行容器时
有
docker run -p 8090:8090 -h=%ComputerName% mycontainer
然后我可以访问http://localhost:8090上的服务
如果我用
启动容器docker run --net="host" -h=%ComputerName% mycontainer
然后我无法访问http://localhost:8090上的服务
为什么??
不应该 -net="host" 容器共享主机的网络,那么为什么我无法使用 --net="host" 访问http://localhost:8090
【问题讨论】:
-
您是否手动打开了 8090 的防火墙?
标签: docker