最佳答案
主机中的容器“突然”与外部世界的容器失去连接。然而,一些主机被更新,突然我们遇到了以下情况:
这里有一个例子:
[root@pprdespap322 deploy]# ping ci.docker.company.net
PING pprdespap324.corp.company.net (10.137.55.22) 56(84) bytes of data.
64 bytes from pprdespap324.corp.company.net (10.137.55.22): icmp_seq=1 ttl=64 time=0.282 ms
64 bytes from pprdespap324.corp.company.net (10.137.55.22): icmp_seq=2 ttl=64 time=0.341 ms
^C
--- pprdespap324.corp.company.net ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.282/0.311/0.341/0.034 ms
现在,从容器本身,我们不能 ping 同一个主机:
[root@pprdespap322 deploy]# docker run -ti quay.io/coreos/registry ping ci.docker.company.net
WARNING: IPv4 forwarding is disabled. Networking will not work.
ping: unknown host ci.docker.company.net
我第一次看到这个警告是在 Docker 的初始版本中... ... 有了 Docker 1.9.1和1.10.3,如何解决这个问题?