moby: Embedded dns server breaks DIND

$ docker --version
Docker version 1.10.0, build 590d5108

Steps to reproduce:

$ docker network create test
1d8159ad6dd00935a91f4cb1d3c61d9f55c0e6c08292780fc43936fcf171cb6e

$ docker run -d --name=dind --net=test --privileged docker:dind
51681e1f9e0a69216ff206011f420a490f8a518a1c68776bf9cc1b71e4783974

$ docker exec dind cat /etc/resolv.conf
search domain.local
nameserver 127.0.0.11
options ndots:0

$ # prove that network and dns connectivity work for other commands

$ docker exec dind ping -c1 google.com 
PING google.com (216.58.216.78): 56 data bytes
64 bytes from 216.58.216.78: seq=0 ttl=52 time=7.998 ms

--- google.com ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 7.998/7.998/7.998 ms

$ docker exec dind docker run busybox                    
Unable to find image 'busybox:latest' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/library/busybox/manifests/latest: Get https://auth.docker.io/token?scope=repository%3Alibrary%2Fbusybox%3Apull&service=registry.docker.io: dial tcp: lookup auth.docker.io on 127.0.0.11:53: no such host.
See 'docker run --help'

About this issue

  • Original URL
  • State: open
  • Created 8 years ago
  • Comments: 34 (12 by maintainers)

Most upvoted comments

I have the same issue. I am using consul dns server using the startups options -recursor=8.8.8.8 -recursor=8.8.4.4"

My /etc/resolv.conf look like this :

domain myapp.com
search myapp.com consul
nameserver 192.168.1.4

If I change my /etc/resolv.conf nameserver to 8.8.8.8 I can pull the image, otherwise, I keep having this error :

Unable to find image 'ubuntu:latest' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/library/ubuntu/manifests/latest: Get https://auth.docker.io/token?account=kopax&scope=repository%3Alibrary%2Fubuntu%3Apull&service=registry.docker.io: dial tcp: lookup auth.docker.io on 192.168.1.4:53: no such host.

However, if I am pulling from a private docker registry, it does work without having to do any change. I really don’t understand how I should debug this issue.

$ docker version
Client:
 Version:      1.10.3
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   20f81dd
 Built:        Thu Mar 10 15:38:58 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.10.3
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   20f81dd
 Built:        Thu Mar 10 15:38:58 2016
 OS/Arch:      linux/amd64