Windwos 7 connecting to Apache Tomcat in a docker container
So you have your docker container running an apache tomcat image and you want to connect to it using your browser. $docker run -d -P tomcat:8-jre8 $docker ps Under ports it tells you this 0.0.0.0:32768->8080/tcp It means that the docker image has tomcat running on 8080 and it is routed to port 32786 on the host. At this point most docker examples say you just pop in the port into your browser and it will work. That is true when your host runs linux , but on windows/mac it is slightly different. Let's explore how docker runs on a windows box. Docker on Windwos/Mac We have Windows sitting on the bare metal running Virtual Box and inside virtual box the default VM is the one that executes the docker commands. Upon closer inspection of the VM settings you can find that it has two network interfaces a NAT-ed connection that allows the default VM to access the internet for updates or to download docker images from the hub and a Host only network interface that al...