I m using docker for windows but my docker container isn t starting on localhost 0 0 0 0 What is the solution to this

0 votes

When I run a container, this happens:

C:\>docker run --name docker-nginx -p 80:80 -d nginx
C:\>docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                           NAMES
d3ccb73a9198        nginx               "nginx -g 'daemon off"   14 hours ago        Up 2 seconds>80/tcp, 443/tcp   docker-nginx

I cant seem to start it on localhost, can someone help me with this?

Aug 30, 2018 in DevOps & Agile by Sophie may
• 10,570 points

1 answer to this question.

0 votes

This happens because your docker containers are actually running on a virtual machine.

1st step would be to check what the IP of your docker machine (virtual machine) is :

$docker-machine ls
NAME      ACTIVE   DRIVER       STATE     URL                         SWARM
default   *        virtualbox   Running   tcp://  

Then run curl command which will show the default web site on your nginx web server inside the container

answered Aug 30, 2018 by Tyrion anex
• 8,690 points

Related Questions In DevOps & Agile

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,140 points
0 votes
2 answers

How to customize the RAM allocation on Docker for Windows?

Try this: docker update --cpu-shares 5120 -m 3000M ...READ MORE

answered Dec 7, 2018 in DevOps & Agile by Maverick
• 10,840 points