Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

'Host.docker.internal' does not resolve from inside container #153

Closed
willemodendaal opened this issue Dec 20, 2018 · 1 comment
Closed

Comments

@willemodendaal
Copy link

I'm trying to call a service on the container host machine (for local dev environment only, not production). Other images, like microsoft/nanoserver allow me to ping host.docker.internal, but the microsoft/aspnet:4.7.2-windowsservercore-1803 image just returns the following error:

PS C:\inetpub\wwwroot> ping host.docker.internal
Ping request could not find host host.docker.internal. Please check the name

Here is my dockerfile:


FROM microsoft/aspnet:4.7.2-windowsservercore-1803
EXPOSE 80
ARG source
WORKDIR /inetpub/wwwroot
COPY . .
ENTRYPOINT ["powershell"]

How do I call the host machine from my docker container? I'm using the default 'nat' network. Running on a Windows 10 laptop.

@StephenMolloy
Copy link
Member

This would be an issue below our layer, and it looks like there already is an open issue for it. docker/for-win#1976

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants