I am following a digital ocean tutorial on how to run the nginx docker container (currently in step 4). This is currently their conclusion:
$ docker run --name docker-nginx -p 80:80 -d nginx d3ccb73a91985651ec61231bca9f9c716f0dec807e354a29eeef2144f883a01c $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES b91f3ce26553 nginx "nginx -g 'daemon off" About a minute ago Up About a minute 0.0.0.0:80->80/tcp, 443/tcp docker-nginx
But when I run it, this is my output (noticed a different IP address of the container):
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
Why is this happening? And how can I get the same results as Digital Ocean? (Getting the server to run on the local host)
Change I am using Docker for Windows (recently released) which apparently works using Hyper-V. My output for docker-machine ls is this:
C:\>docker-machine ls NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS C:\>
source share