19

I've a problem with my Docker. When I run the docker pull command, I get a fatal error.

run: docker pull golang

get: Pulling repository golang FATA[0000] Get https://index.docker.io/v1/repositories/library/golang/images: dial tcp: lookup index.docker.io on [192.168.3.50]:53: server misbehaving

This problem occurred, even though I tried pull a different image.

How can I solve this problem?
My docker version is 1.4.1

jjaros
  • 518
  • 2
  • 4
  • 18
  • 1
    The IP from the GET result looks like a local IP. Are you sure there's not a proxy or a DNS policy Preventing you from getting to this address ? – Laurent Jalbert Simard Feb 03 '15 at 14:47
  • Yes, the problem was in DNS...I added a line `nameserver 8.8.8.8` into **/etc/resolv.conf** and this solved my problem. Thanks.. – jjaros Feb 04 '15 at 06:44
  • `[192.168.3.50]:53: server misbehaving` is a DNS response, for the record – Michael Feb 04 '15 at 08:10

5 Answers5

37

I had this problem when doing docker build . and was getting

Error while pulling image: 
Get https://index.docker.io/v1/repositories/library/debian/images: 
dial tcp: lookup index.docker.io on 75.75.76.76:53: server misbehaving

and

Error while pulling image: 
Get https://index.docker.io/v1/repositories/library/debian/images: 
dial tcp: lookup index.docker.io: no such host

Restarting the vm that docker uses fixed my problem:

docker-machine restart default && eval "$(docker-machine env default)"
Chad
  • 2,161
  • 1
  • 19
  • 18
  • Worked for me, but only after [regenerate-certs](http://stackoverflow.com/a/32257049/27358) as well. I suspect it was because I was on a different network when I started docker-machine. – David Moles Jan 08 '16 at 22:57
  • 1
    Faced same issue. I started docker vm on one network and tried docker pull on another. Restart fixed the issue. – Sunil Jan 11 '16 at 01:40
  • Thanks! Solved my issue. – kashesandr Mar 27 '16 at 13:48
  • 2
    Same issue but using Docker For Mac Beta, so regenerating certs or re-mapping docker-machine not an option for me :( – Andrew K May 20 '16 at 05:19
  • this also solved my issue, which was documented here https://github.com/apocas/dockerode/issues/247 – Dinis Cruz May 24 '16 at 10:54
12

Your DNS-server can not lookup docker-register domain (index.docker.io). Please, recheck DNS-records in your local DNS-server or replace it for a public server, example, 8.8.8.8.

srj
  • 9,591
  • 2
  • 23
  • 27
Alex Zemlyakov
  • 161
  • 1
  • 2
1

I've seen a similar issue on OSX with Docker stable v1.13.0. The issue is intermittent and occurs on multiple OSX laptops in the office. When the issue manifests this is the error message:

error pulling image configuration: 
Get https://prod-ap-southeast-2-starport-layer-bucket.s3-REGION.amazonaws.com/XXX: 
dial tcp: lookup prod-REGION-starport-layer-bucket.s3-ap-southeast-2.amazonaws.com on 192.168.xxx.xxx:53: 
no such host

We have been able to reliably fix it by running the following command:

docker run --rm -v /etc/resolv.conf:/rtemp debian:8 bash -c 'echo "nameserver 8.8.8.8" > /rtemp'

Note this command needs to be run every time the docker client is started. The command is changing the docker engine DNS settings to stop proxying through docker client (and thus using your host DNS settings) and instead to resolve DNS queries through a Google DNS server at 8.8.8.8.

I believe the root cause is that the payload size of the DNS responses for the amazon URL changes, and when it is greater than 512 bytes the Docker client DNS proxy cannot handle the response.

I believe the root cause is discussed in this open docker issue but can't be sure : https://github.com/docker/docker/issues/18842

zayquan
  • 7,544
  • 2
  • 30
  • 39
1

Yes, i solved my problem!! "I added a line nameserver 8.8.8.8 into /etc/resolv.conf " I just commented this line nameserver fe80::1%wlo1

Harsha Biyani
  • 7,049
  • 9
  • 37
  • 61
0

try below commands

    $ docker-machine ssh
    $ sudo su
    $ echo "nameserver 8.8.8.8" > /etc/resolv.conf
Harsha Biyani
  • 7,049
  • 9
  • 37
  • 61
Sachin Gade
  • 495
  • 4
  • 4