-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker in Docker (dind) container linking problem on macOS #1302
Comments
@Uplink03 thanks for your report.
This is an obnoxious behaviour of the Virgin Media (who I am also with at home) DNS resolver which redirects The upshot is that your lookup of The question though is why this is going to your upstream nameservers at all (since they clearly won't know about your containers) rather than being handled locally by docker. I tried your repro in our office (which isn't on Virgin) and things just worked with no messing. stracing I see:
So it does indeed appear to be asking the network before consulting I'm going to close this one for now, but please let us know if this does somehow turnout to be docker ofr mac specific. |
I haven't opened the issue with the other repository as recommended (I didn't have time to think how to present it), but I'm putting this note here with a workaround for people who need a fix immediately. Force Google DNS in Docker for Mac using a custom config:
This goes in: Preferences -> Daemon -> Advanced. I had |
Closed issues are locked after 30 days of inactivity. If you have found a problem that seems similar to this, please open a new issue. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
Expected behavior
docker info
should just work:Actual behavior
docker info
cannot resolve the hostnamedocker
, but it works fine it pointed directly to the IP address:Information
Docker for Mac: version: 1.13.1 (94675c5a7)
macOS: version 10.12.3 (build: 16D32)
logs: /tmp/70A59DC6-BF23-4515-BC34-03CC59FF47A3/20170214-181939.tar.gz
[OK] vmnetd
[OK] dns
[OK] driver.amd64-linux
[OK] virtualization VT-X
[OK] app
[OK] moby
[OK] system
[OK] moby-syslog
[OK] db
[OK] env
[OK] virtualization kern.hv_support
[OK] slirp
[OK] osxfs
[OK] moby-console
[OK] logs
[OK] docker-cli
[OK] menubar
[OK] disk
Steps to reproduce the behavior
In the macOS Terminal:
In the second container's shell:
The cause - but only on Mac?
In the second container:
Where does 192.168.65.1 come from? I seem able to ping many addresses that are unpingable from the host (4.4.4.4, 254.254.254.254, 1.3.3.7, ...)
Why is it resolving 'docker' to '81.200.64.50'?
Going to that IP I get a Virgin Media page. I'm with Virgin Media coincidentally. It says something about 'Advanced Network Error Search', but I've never seen that ever before.
In the corner it says: This service is optional and you can switch it off here
So I clicked on it:
WTF IS THAT?
I switch to 'No' and... HURRAH! Magically and immediately the problem is gone. I don't even have to restart any containers...
Why do I get this only on my Macs? It doesn't happen in Linux.
The text was updated successfully, but these errors were encountered: