>  Q&A  >  본문

docker配置了dns却不能访问域名站点

我的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
黄舟黄舟2706일 전582

모든 응답(1)나는 대답할 것이다

  • 巴扎黑

    巴扎黑2017-04-25 09:03:46

    두 가지 문제가 있을 수 있습니다.
    1. DNS 확인 설정에 문제가 있습니다.
    2. 확인 지연

    회신하다
    0
  • 취소회신하다