Expected behavior
DNS should resolve consistently within a container every time.
Actual behavior
Occasionally DNS will not resolve with no pattern, and causes failures when doing a docker build
Information
OS X: version 10.11.4 (build: 15E65)
Docker.app: version v1.11.0-beta7
Running diagnostic tests:
[OK] docker-cli
[OK] Moby booted
[OK] driver.amd64-linux
[OK] vmnetd
[OK] osxfs
[OK] db
[OK] slirp
[OK] menubar
[OK] environment
[OK] Docker
[OK] VT-x
Docker logs are being collected into /tmp/20160419-171424.tar.gz
Most specific failure is: No error was detected
Your unique id is: B252C346-DC86-40B3-AFE8-FF88F8B6571C
Please quote this in all correspondence.
Iāve created a repository with the Dockerfile and other files Iāve used to reproduce this issue
Steps to reproduce the behavior
- git clone git@github.com:ecliptik/docker-beta-mac-ruby.git
- docker build --no-cache -t docker-beta-mac-ruby .
- Look for
Gem::RemoteFetcher::UnknownHostError: no such name
errors
More Information
This issue first appeared after turning off VPN Compatibility Mode from the Docker App settings because I wanted to use the docker.local DNS alias instead of finding out the IP of the docker VM to test the rails app on port 3000.
When turning this setting off all docker
commands started not working (see my related comment in Docker becomes unresponsive - #12 by steel). In order to try and bring Docker back up properly Iāve done the following:
- Rebooted the Mac
- Reset Docker to Factory Defaults
- Re-installed from scratch
Now Docker only works if the VPN Setting is checked.
I can also reproduce an intermittent DNS issue from a container shell with the same repository. The same dig command from OSX does not produce any timeouts.
- git clone git@github.com:ecliptik/docker-beta-mac-ruby.git
- docker build -f Dockerfile.shell --no-cache -t docker-beta-mac-ruby .
- docker run -it --rm docker-beta-mac-ruby
- while true; do dig rubygems.org +short; sleep 1; done
This will do a lookup on rubygems.org every second, and occasionally it will give a DNS issue. Here is some example output:
root@d3eede8e3d0a:/app# cat /etc/resolv.conf
search local
nameserver 192.168.64.1
root@d3eede8e3d0a:/app# while true; do dig rubygems.org +short; sleep 1; done
54.186.104.15
54.186.104.15
; <<>> DiG 9.9.5-9+deb8u6-Debian <<>> rubygems.org +short
;; global options: +cmd
;; connection timed out; no servers could be reached
54.186.104.15
54.186.104.15
54.186.104.15
54.186.104.15
54.186.104.15
54.186.104.15
54.186.104.15
54.186.104.15