Docker Community Forums

Share and learn in the Docker community.

Access Container via container private ip from windows host machine

While I inspect an container I got its IP as and its port 80 is exposed as well.
But I can’t access it from by browser neither can reachable via ping from windows command line. But I can access it via ip which is defined by docker. Any workaround on this?

N.B: I’m using DockerForWindows on my windows 10 machine.

You have to add route from your host to containers via the next command (under elevated privilegies at your host):

route add mask -p

I hope it will be done via Docker itself in the future.


Got your point.

Thanky you @korsakov for the hint! I was trying the manual routing for a while, but failed on determining the correct gateway IP

I’ll try to file a feature request for dockerwin to do this automatically.