Docker Community Forums

Share and learn in the Docker community.

DNS for .local not working


(David J. M. Karlsen) #1

Expected behavior

Be able to resolve docker.local

Actual behavior

docker.local is not resolvable

Information

Davids-MBP:Downloads david$ pinata diagnose -u
OS X: version 10.11.4 (build: 15E65)
Docker.app: version v1.10.3-beta5
Running diagnostic tests:
[OK] docker-cli
[OK] Moby booted
[OK] driver.amd64-linux
[OK] vmnetd
[OK] lofs
[OK] osxfs
[OK] db
[OK] slirp
[OK] menubar
[OK] environment
[OK] Docker
[OK] VT-x
Docker logs are being collected into /tmp/20160403-171147.tar.gz.
Your unique id in bugsnag is: 1EDFF4DE-CF56-4A4C-94AC-C5540B79BEE6
Please quote this in all correspondence.

Davids-MBP:Downloads david$ uname -a
Darwin Davids-MBP.lan.davidkarlsen.com 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64
Davids-MBP:Downloads david$

running macOsX 10.11.4 with dual ipv4/ipv6 stack

Steps to reproduce the behavior

install docker for mac


(Eric Redmond) #2

I’ve noticed that docker.local doesn’t work for me if I have VPN Compatibility mode checked. The PORTS lists 0.0.0.0:80->80/tcp instead of docker.local:80->80/tcp.


(Dblandin) #3

I’m having trouble with the docker.local DNS resolution as well.

Here’s the output from dig docker.local:

$ dig docker.local

; <<>> DiG 9.8.3-P1 <<>> docker.local
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 29867
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;docker.local.                  IN      A

;; AUTHORITY SECTION:
.                       3032    IN      SOA     a.root-servers.net. nstld.verisign-grs.com. 2016040400 1800 900 604800 86400

;; Query time: 27 msec
;; SERVER: 208.67.222.222#53(208.67.222.222)
;; WHEN: Mon Apr  4 10:26:15 2016
;; MSG SIZE  rcvd: 105

The ports of my containers actually have an explicit IP. These containers are spun up via docker-compose:

 CONTAINER ID        IMAGE                   COMMAND                  CREATED             STATUS              PORTS                                                      NAMES
e463d4f1a8a4        memcached               "/entrypoint.sh memca"   7 minutes ago       Up 6 minutes        192.168.64.4:11211->11211/tcp                              harness_memcached_1
1f6f283980a9        kafka                   "supervisord -n"         7 minutes ago       Up 6 minutes        192.168.64.4:2181->2181/tcp, 192.168.64.4:9092->9092/tcp   harness_kafka_1
912632c15933        redis:2.8               "/entrypoint.sh redis"   7 minutes ago       Up 7 minutes        192.168.64.4:6379->6379/tcp                                harness_redis_1
de44e67bf52c        ankurcha/tokumx         "mongod --smallfiles"    7 minutes ago       Up 7 minutes        192.168.64.4:27017->27017/tcp, 28017/tcp                   harness_mongo_1

(David J. M. Karlsen) #4

Good catch - that was it - thanks!


(David J. M. Karlsen) #5

It seems to be implemented with mDNS and not traditional DNS - so dig/nslookup won´t work for docker.local