I am running Docker Toolkit 1.9.1 on windows 10 64bit, and I am trying to look at the james turnbull book and a simple build up example site.
In a Docker shell, I have created a directory dockerBuilds
. In that directory, I created another directory called my-tomcat
.
I cd
into that directory and run touch Dockerfile
. I then created a simple docker build file like this
# start from base image
FROM library/tomcat
MAINTAINER Will Woodman "will.woodman@btinternet.com"
from this I build my image with
docker build -t my-tomcat .
When I start a container with
docker run --name tomcatApp -i -p 8080:8080 my-tomcat
I can see the log trace as tomcat starts up, and when it is settled, connections to http://localhost:8080
fails with Chrome or other browsers.
I stopped and removed the container and then tried:
docker run --name tomcatApp -i -p 127.0.0.1:8080:8080 my-tomcat
and get the same problem.
I even tried to connect to the default docker vm by pointing the browser to http://192.168.99.100:8080
, and still can't connect.
So I must be doing something wrong but I don't know what. The logs look fine and the server says it is up. but I'm not seeing any connection when I browse. docker stats tomcatApp
shows container is running.
What am I missing here for the port mappings from my windows localhost to the containers ports?
I see this using docker inspect
- which looks ok to me
"NetworkSettings": {
"Bridge": "",
"SandboxID": "7c58e33e5d3821fc8a1dc6bb6957031d11e07c04bf34f8aa7b17f8afeff03700",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"8080/tcp": [
{
"HostIp": "127.0.0.1",
"HostPort": "8080"
}
]
},
What am I doing wrong?