How to fix Docker's "Error pulling image...too many redirects" failures while pulling images from registry? How to fix Docker's "Error pulling image...too many redirects" failures while pulling images from registry? docker docker

How to fix Docker's "Error pulling image...too many redirects" failures while pulling images from registry?


Try this temporary workaround:

osx$ boot2docker uposx$ boot2docker sshdocker@boot2docker$ sudo echo "nameserver 8.8.8.8" > /etc/resolv.confdocker@boot2docker$ sudo /etc/init.d/docker restart

It works until reboot.


I don't know about OS X, but on linux this could happen due to "bad" /etc/resolv.conf on the host. For example, ubuntu puts something like:

nameserver 127.0.1.1

and then handles the DNS requests through some service. The problem is, that this is accessible from inside of the image.

To fix this, I had to add some external nameservers, like:

nameserver 127.0.1.1nameserver 8.8.8.8nameserver 8.8.4.4


10.0.2.3 is virtualbox dns server, check Fine-tuning the VirtualBox NAT engine

You can as other suggested use 8.8.8.8 which is google dns server.

# /etc/resolve.confnameserver 8.8.8.8

And if you work in intranet, then replace it with your normal dns server, which you can add search as well like below

# /etc/resolve.confnameserver xxx.xxxx.xxxsearch company.com

This will be good to access your private repo