-
Notifications
You must be signed in to change notification settings - Fork 118
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
DNS lookup failure for: host.docker.internal #3742
Comments
Does |
Neither works for me. Attempted with
|
EDIT: In my case, this was due to configuring my shell with Neither works for me either: $ docker run --rm alpine nslookup host.docker.internal
nslookup: can't resolve '(null)': Name does not resolve
nslookup: can't resolve 'host.docker.internal': Name does not resolve
$ docker run --rm alpine nslookup docker.for.mac.localhost
nslookup: can't resolve '(null)': Name does not resolve
nslookup: can't resolve 'docker.for.mac.localhost': Name does not resolve
Perhaps of interest: |
I have the same issue on
My current workaround is to hard code wherever I need to use the host ip. Horrible solution, but it works for now. Simlarily, |
I've had the same issue on both macos 10.14 and 10.15 Current setup is:
I've noticed that a clean install of Docker Desktop will resolve host.docker.internal. But, if I specify my company's DNS (or any DNS, really) via the docker run --dns option or by adding DNS entries in daemon.json, then host.docker.internal no longer resolves. Also, it seems that docker.for.mac.localhost resolves to 127.0.0.1 inside the container, not to the Mac host IP. |
I experienced the same issue as @jmmen1 , same versions and the same thing where the problem would only occur when adding DNS entries. I noticed that So if I added "192.168.65.1" as an extra DNS entry to the daemon.json with the other ones I wanted to define, then It might be that that IP is a default DNS entry, and when you define custom DNS entries via daemon.json, then the custom ones override that and it gets removed. Can't confirm how reliable this is. |
Indeed. I didn't want to assume that 192.168.65.1 will always be the host IP address. That's what the host name is for. |
Removing the |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
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. |
I think this is similar to this one #2965
I urgently need help...
macOS Mojave
10.14.5
Docker Desktop 2.0.0.3
Engine: 18.09.2
The text was updated successfully, but these errors were encountered: