Windows 10 Home :can't reach ‘localhost:8000’ using Docker

Viewed 691

I'm beginning to use Docker and following the tutorial (https://docs.docker.com/get-started/part2/) and I am stuck at this point:

docker run --publish 8000:8080 --detach --name bb bulletinboard:1.0

When I try to reach localhost:8080 it says "impossible to reach the site".

When I run docker-machine ip and visiting http://192.168.99.100:8080 with a web client, it does not work.

3 Answers

Please access with port 8000 like localhost:8000 because you mapping docker port from 8080 to 8000 to access from outsaide docker container

Change Port from 8080 to 8000 like this http://192.168.99.100:8000 because you connect machine port 8000 to docker port 8080.

I hope it may help you.

When you use docker commands, always remember.. outside_world -> docker_world

In your 8000:8080 means. You open your container to outside world on port 8000 , inside docker its 8080

Or simply mapping docker port 8080 to 8000 outside.

In this configuration, you should use localhost:8000

docker-machine ip this is completely different network, thats why you can not access it. Its container network.

Related