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
d3ccb73a91985651ec61231bca9f9c716f0dec807e354a29eeef2144f883a01c
C:\>docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                           NAMES
d3ccb73a9198        nginx               "nginx -g 'daemon off"   14 hours ago        Up 2 seconds        10.0.75.2:80->80/tcp, 443/tcp   docker-nginx

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

Aug 29, 2018 in DevOps & Agile by Sophie may
• 9,050 points
25 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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://192.168.99.100  

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

curl http://192.168.99.100:80
answered Aug 29, 2018 by Tyrion anex
• 8,280 points

Related Questions In DevOps & Agile

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 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
• 56,120 points
56 views
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 6, 2018 in DevOps & Agile by Maverick
• 10,000 points
47 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.