I am running Docker via CoreOS and Vagrant on OS X 10.10.
When I run docker pull ubuntu
in CoreOS, I got following errors:
$ docker pull
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.conf
nameserver 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.conf
nameserver xxx.xxxx.xxx
search company.com
This will be good to access your private repo
On MacOSX, if you use Docker Machine you can try to:
docker-machine ls
docker-machine ssh YOUR_VM_NAME
and then from within the VM: kill the /usr/local/bin/docker process and start it again by hand:
sudo /usr/local/bin/docker -d -D -g /var/lib/docker -H unix:// -H tcp://0.0.0.0:2376 --label provider=virtualbox --tlsverify --tlscacert=/var/lib/boot2docker/ca.pem --tlscert=/var/lib/boot2docker/server.pem --tlskey=/var/lib/boot2docker/server-key.pem -s aufs
Funnily enough, restarting like this
sudo /etc/init.d/docker restart
does not help.
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.1
nameserver 8.8.8.8
nameserver 8.8.4.4
Try this temporary workaround:
osx$ boot2docker up
osx$ boot2docker ssh
docker@boot2docker$ sudo echo "nameserver 8.8.8.8" > /etc/resolv.conf
docker@boot2docker$ sudo /etc/init.d/docker restart
It works until reboot.
On windows I was able to fix it by doing the following:
Now I am able to download docker images from the hub.
I had a similar issue when trying to pull a container from docker repository with this command :
docker pull ubuntu
Note that I was using coreos inside virtualbox and I was using Nat as my Networking Configuration to have access to internet. When Switching network modes with virtualbox, I couldn't do any pull.
I solved the issue by restarting docker with systemctl by iniating this command :
sudo systemctl restart docker
And then my pull worked fine. I hope this solution helped you. And I got it from from google group issue addressed by one of CoreOS creators(Brandon Philips) through this link: https://groups.google.com/forum/#!topic/coreos-dev/vWqSbPgNYro