Docker Container没有到主机错误的路由

时间:2018-03-06 16:35:25

标签: docker networking iptables docker-machine

我有以下泊坞:

docker --version
Docker version 17.12.0-ce, build c97c6d6

当我对外部URL执行CURL时,它会失败:

内部容器$> curl -u username -p https://countries.c1.com/countries/v1/countries

curl: (7) Failed to connect to 10.10.20.30 port 443: No route to host

内部容器$> ping countries.c1.com

PING countries.c1.com (10.10.20.30): 56 data bytes
64 bytes from 10.10.20.30: icmp_seq=0 ttl=250 time=2.919 ms
--- countries.c1.com ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max/stddev = 2.919/2.919/2.919/0.000 ms

所以宿主可以解决,但不能卷曲。当我从docker容器外部(例如docker host或laptop)运行相同的curl语句时,它工作正常!

任何暗示我指向正确方向的提示都会非常感激!

我不确定哪种配置可能相关。如果要求,我会在以后提供任何内容。

0 个答案:

没有答案