Getting docker virtual environment IP in Windows 10

Docker is a full development platform for creating containerized apps. It is a platform available for Windows, GNU/Linux and MAC here.

Unfortunately, for Windows users, the docker version you can get depends on the Windows you are running.

Windows Docker Access
Windows Home Docker Toolbox link
Windows Pro Docket link

This is because Windows Home systems goes without Hyper-V.

In the cases like mine (my dell xps 13 came with pre-installed Windows Home), docker daemon and containers cannot run natively, only the docker client is running on the Windows machine. So, both docker daemon and containers are run in a VirtualBox Virtual Machine (that runs Linux).

To connect to the container, one must connect to the IP-address of the VirtualBox Virtual Machine. Hence…

…if you are on non-hyper-v machine (windows 10 home)

docker run -p 80:80 -d nginx
docker-machine ip default

Then one can open the browser and go to the gotten IP.

…if you are on a hyper-v machine (windows 10 pro)

docker run -p 80:80 -d nginx

Then one can open the browser and to to http://localhost.