Docker Community Forums

Share and learn in the Docker community.

Ports do not get exposed (Windows Container)

(David Weisgerber) #1

I am using Docker on Windows Server 2016 with Windows Container (no Linux involved).
Although everything else seems to run fine I am not able to expose any ports from the container to the host system like I would do it in the Linux world. The docker daemon does not throw any error but there are no ports forwarded either.
For this I am using a virgin Windows Server 2016 installation, is there anything else that I have to do in order to get it working? MSDN docs did not say anything about it.


PS: docker logs -f does not seem to follow, starting a docker container is really slow compared to Linux and microsoft/windowsservercore is really huge (while I do not know how far I would get with nanoserver).

(Michael Friis) #2

Does this explain what you’re seeing?

(David Weisgerber) #3

No. I tried it from remote machines as well. In addition shouldn’t netstat /ab also show the port?

(Michael Friis) #4

Interesting - does accessing the container on the container IP from the host work? Eg.:

 docker inspect --format '{{ .NetworkSettings.Networks.nat.IPAddress }}' <container>

(David Weisgerber) #5

Yes. I already tried it. From the host I can access the port on the container by using the container’s IP address.

(Michael Friis) #6

Got it - can you try manually opening the relevant ports in the Windows Firewall?

(David Weisgerber) #7

I regret this topic because I am just stupid. The problem was not docker but wrong proxy settings on the machine I tested the connection with :wink:

Other related question: There is no docker proxy on Windows Containers? How can I see from the host which ports are forwarded?