Docker Community Forums

Share and learn in the Docker community.

Docker DNS fails in container

Current docker version: 1.13.1, build 092cba3.

Contents of /etc/resolv.conf:

search mycompany.local
nameserver 127.0.0.11
options ndots:0

(real company name obfuscated).

nslookup on the host itself is 100% fine, but from within container any hostname look fails (can’t event run apt-get update).
The same symptoms persist in all my hosts in the 4-node cluster.

Running the same application directly on my laptop (on same office network) hostnames resolve fine.

This is becoming a bit of a slow moving disaster.

The cluster involved is still a pre-1.12 build, it that might have any bearing.

Just some more info: the containers in question is brought up with docker-compse (latest 1.10 version), with compose file format 2. No DNS settings present.

Duplicating tests from this blog produces a container with correctly functioning DNS (in the same swarm).

So the main difference seems to be the use of docker-compse at this point.

Ok, never mind.

It SEEMS we had a subtle, but persistent issue in our primary internal DNS server. Restarting that service seems to have fixed everything eventually.