-
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
host.docker.internal does not resolve properly #2965
Comments
I've got the same problem on Mac OS Mojave 10.14. |
I have exactly the same problem. It makes networking between services impossible to set up on the Mac. I add my vote for a quick fix, as this is a showstopper in many Mac dev projects. |
@PeterBengtson I had to move back to using Vagrant while the rest of the team happy enjoys Docker because of this issue. |
Has there been any progress on this issue? |
I have exactly the same problem. on Mac OS Mojave. |
Same problem on OSX Mojave (10.14) using However, |
I'm using this with latest stable Docker and docker-compose with NFS on the latest macos and it works fine.. |
Hi @PeterBengtson @128keaton, can you please let us know what is the status here? Thanks a lot. |
Situation resolved - it was a question of using the right IP for resolving
in the nginx proxy conf.
tis 6 nov. 2018 kl. 11:10 skrev Gregory Reshetniak <[email protected]
…:
Hi @PeterBengtson <https://github.com/PeterBengtson> @128keaton
<https://github.com/128keaton>, can you please let us know what is the
status here? Thanks a lot.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2965 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAPObSEz54HEAe6cWVxnWqXPpuUel1qks5usWAHgaJpZM4UXAjw>
.
|
Not sure how nginx factors in here. I have checked and can
confirm host.docker.internal is not being resolved on my 18.06 which
prevents me from using docker
…On Tue, 6 Nov 2018, 13:09 Peter Bengtson ***@***.*** wrote:
Situation resolved - it was a question of using the right IP for resolving
in the nginx proxy conf.
tis 6 nov. 2018 kl. 11:10 skrev Gregory Reshetniak <
***@***.***
>:
> Hi @PeterBengtson <https://github.com/PeterBengtson> @128keaton
> <https://github.com/128keaton>, can you please let us know what is the
> status here? Thanks a lot.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#2965 (comment)>,
> or mute the thread
> <
https://github.com/notifications/unsubscribe-auth/AAAPObSEz54HEAe6cWVxnWqXPpuUel1qks5usWAHgaJpZM4UXAjw
>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2965 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACRlBanMhEa-3ytEvzRJ3HdTl-Twme_sks5usXvmgaJpZM4UXAjw>
.
|
have a look at https://github.com/qoomon/docker-host as a workaround |
I also had this issue. Reinstalling with the latest stable version ( My original installation was pretty old (I'd applied updates, but never reinstalled anew) that had some dns haxin' lingering as described in this issue. Maybe it was related? |
Reinstall fixed it for me. Thanks! |
I have the same problem on macOS (Mojave) with docker (18.09) and also (18.06.1-ce). A ping to But
|
Same issue here as @sonerd
|
I found this in /etc/hosts 172.16.238.1 docker.for.lin.host.internal |
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. |
I have the same problem in macos mojave 10.14.5 (18F132) and Docker version 19.03.0-rc2, build f97efcc: `> $ docker run --rm alpine nslookup host.docker.internal nslookup: can't resolve '(null)': Name does not resolve |
I seem to have this issue as well. What should I do?... |
This issue has been up/alive for over a year. That, combined with the lack of documentation on Docker's FS implementation on mac (sucks!) really makes you think if docker is the right move anymore. |
I can't understand why this simple issue cannot be solved.... for now it seems that I just need to use |
Having the same exact issue. Docker Desktop 2.1.0.1 (37199) stable.
|
Same here, worked around with bridge network |
Any update?
and
with Docker version 19.03.1, build 74b1e89 |
I've been running into this issue as well, when trying to use NFS for filesystem mounts. No resolution, tried anything suggested in this issue so far, short of completely uninstalling and reinstalling Docker for Mac (on Catalina, 10.15.3). |
Well that's embarrassing... I spent 30 minutes on this, and finally re-read my error message:
The problem was I had copied and pasted the config from a gist or blog post to get NFS configured in my docker-compose file, and it had the format: o: addr=addr=host.docker.internal,rw,nolock,hard,nointr,nfsvers=3 So someone must've fat-fingered that in whatever post/example I was reading. I deleted the extra |
Going into the preferences and removing this from the |
Running and then once in the docker container running: returns:
On the docker container my
No reference to host.docker.internal anywhere. Any thoughts? Running Docker for Mac on macOS Catalina 10.15.1.
|
@chasen-bettinger it is from the docker dns, in your case
So if the dns is not set to the internal docker dns, the hostname |
How do you set the DNS to the internal docker DNS? I'm confused mostly because the way the documentation is written, it seems like it should work out of the box. |
The default with no dns is in the docker config should use the default docker dns. If you add other dns servers in the config you probably also need to add the default as the first (only the first 2 are used normally). |
I have solved in Docker version 19.03.12 and MacOS Catalina 10.15.7 I found "kubernetes.docker.internal" |
Use ip works for me. thanks |
Hmm. still broken. when |
I've noticed ...
# Added by Docker Desktop
# To allow the same kube context to work on the host and the container:
127.0.0.1 kubernetes.docker.internal
127.0.0.1 host.docker.internal # (NOTE) I added this
# End of section
... That seemed to work in my case where I wanted containers to contact my localhost services, whilst allowing my client to access services via |
I have a stock docker for mac install. I'm trying to talk to my host's http server. I'm following the advice from the documentation here: but:
Why doesn't this work? Has it truly not worked since 2018?
|
Still works for me. Not using a VPN or something?
docker info
|
No, I don't have any VPN or other exotic network setup, am using default DNS settings, no surprising docker config options, just pretty stock Docker for Mac. |
I was also having this issue. Can't say about for all platforms, but I can confirm this issue is fixed in latest release for Apple silicon |
Thanks for the report. There was a recent bug fix in Docker Desktop 3.4.0 which should ensure that |
@djs55 im on latest mac osx (intel) with latest docker and docker desktop freshly installed , doesn't help after more research seems: |
@nahum-litvin-hs Could you share a repro example? Maybe there's something in the container configuration that's a bit different. Also please upload diagnostics and quote the ID so I can take a look at the logs. Thanks! |
unfortunately I have no time to reproduce, this issue already took me way off schedule. |
@djs55 Same issue here on Docker Desktop for mac 3.5.2. |
I can confirm @nahum-litvin-hs 's fix works on Docker Desktop for Mac 3.5.2 (Intel, MacOS Big Sur 11.5), without which the host cannot be reached from within container. |
this works for me :) |
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
host.docker.internal to resolve properly
Actual behavior
host.docker.internal does not resolve to anything.
Information
Diagnostic logs
Steps to reproduce the behavior
(simple demo)
docker run --rm alpine nslookup host.docker.internal
(use in dev)
Running docker-compose up with this configuration results in:
ERROR: for php Cannot create container for service php: error resolving passed in nfs address: lookup addr=host.docker.internal: no such host
I have tried rebooting and resetting Docker. I'd rather not update to 10.13.
The text was updated successfully, but these errors were encountered: