docker配置了dns却不能访问域名站点
黄舟
黄舟 2017-04-25 09:01:46
0
1
638

我的docker配置了默认的域名服务器,但是运行后能够pingip地址,却不能ping通域名站点。该怎么办?

$ ps -ef | grep docker
root      1130     1  0 17:32 ?        00:00:10 /usr/bin/docker daemon -H fd:// --dns=61.139.2.69 --registry-mirror=https://44mfwmrx.mirror.aliyuncs.com

$ docker run -it --dns=61.139.2.69 centos
[root@c3b7344feace /]# ping 61.135.169.125
PING 61.135.169.125 (61.135.169.125) 56(84) bytes of data.
64 bytes from 61.135.169.125: icmp_seq=1 ttl=54 time=46.1 ms
64 bytes from 61.135.169.125: icmp_seq=2 ttl=54 time=45.2 ms
64 bytes from 61.135.169.125: icmp_seq=3 ttl=54 time=45.7 ms
^C
--- 61.135.169.125 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 45.246/45.686/46.109/0.393 ms

[root@c3b7344feace /]# ping -c 2 www.baidu.com 
ping: unknown host www.baidu.com
黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

Antworte allen(1)
巴扎黑

有可能是这两个问题:
1、DNS解析设置有问题
2、解析延迟

Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage