Can't access to localhost:8080 with docker on windows 10 Can't access to localhost:8080 with docker on windows 10 docker docker

Can't access to localhost:8080 with docker on windows 10


I ran my container:

docker run -d -it -p 10080:80 --name=container-cool-name <container-id>

And I could see my running app with curl (inside the container)

docker exec -ti container-cool-name bash#curl localhost:80

Here I read:

If you’re using Docker Toolbox

"docker-machine ip will tell you"

My app was correctly displaying at 192.168.99.100:10080


Try following steps,

1 - List all the running docker containers

docker ps -a

After you run this command you should be able to view all your docker containers that are currently running and you should see a container with the name webapp_web_1 listed there.

2 - Get the IP address where your webserver container is running. To do that run the following command.

 docker inspect -f "{{ .NetworkSettings.Networks.nat.IPAddress }}" webapp_web_1

Try accessing the IP which is shown after running above command and access your running container with that IP instead of localhost.

I have answered to a simillar question related to this exact problem on Windows. Please refer it via this link to get a detailed idea on why this issue prevails.

Hope this helps you out.