Docker Community Forums

Share and learn in the Docker community.

Connect Windows host to internal docker network

(Wuebbel) #1

I develop Linux web application containers, usually on a Linux server. For this, I create the container (for safety reasons without forwarding ports in the development stage), inspect it to grab the IP, and connect to the container directly.

I would like to do the same on a Windows 10 notebook in Docker for Windows (used stable and edge versions), which doesn’t work since the containers give out the IP of the docker VM’s internal network, as stated in the docs.

Is there any simple way around this? Like connecting the containers to the Hyper V-network? I wouldn’t care if that makes it impossible to forward ports to the outside world, it’s not a production machine anyway.

Best wishes, Frank

OS: Windows 10
Docker for Windows, Docker version 18.02.0-ce-rc1, build 5e1d90a
Steps to reproduce:

docker run -d --name nginx nginx
IP=$( docker inspect --format ‘{{ .NetworkSettings.IPAddress }}’ nginx)
ping $IP

loses all packets.