Docker didn't forward the port from web service
I’m using ASP Core image to create a new container.
I’ve developed simple service which uses port
Now I created Dockerfile and built container which exposes
Running this container with a command
docker run -it -p 8080:5000 <name>
docker run -it -p 127.0.0.1:8080:5000 <name>
doesn’t lead to navigation to the
127.0.0.1:8080. So my browser says
this site can't be reached.
p.s. I’ve checked the service without docker – it works correctly
shows my launched container with ports mapping information:
netstat output from the host
tcp 0 0 localhost:5000 *:* LISTEN
lynx 127.0.0.1:5000 shows
netstat -a on a client box doesn’t show
8081 port or
I’ve just created a new container for NodeJs using public image.
Created a simple server with exposed port. After running it works as expected.
Actually it looks like the problem with exact Asp image
One Solution collect form web for “Docker didn't forward the port from web service”
Which OS are you using? If you’re running on OSX or Windows you will need to use the IP of your boot2docker virtual machine, not 127.0.0.1.
docker-machine ip will show you the IP of your current host.