Install Docker on Windows 10 / Windows 7 / Server 2016

Docker on Windows is a little bit different than on Linux. Because Docker runs using features of the Linux operating system which not supported by Microsoft Windows. To run Docker on windows 10, Docker Toolbox will create a Linux virtual machine in VirtualBox and all containers will be created inside the virtual machine.

In this tutorial we will learn How to Install Docker on Windows 10 using the Docker Toolbox. You can also use following guide to install docker for Windows 7 and Windows Server 2016.

Download Docker Toolbox for Windows 10 / 7 / Server 2016

Go to following URL http://docker.com/toolbox and download the Docker Toolbox for Windows 10.

Download Docker Toolbox for Windows 10 / 7 / Server 2016

Install Docker Toolbox on Windows 10

After download is finished, run the setup file and install the docker toolbox with default options.

Open Docker Quickstart Terminal

From Windows 10 start menu launch the Docker Quickstart Terminal. The First time, it will run the initial configuration and will create the default virtual machine for the Docker Engine.

Install Docker Windows 10 Quickstart Terminal

Once it is done, you can manage docker from Windows using Quickstart Terminal, Windows CMD, or PowerShell.

To check the Docker version Type:

docker version

Note that Docker Engine is running inside a Virtual Machine also called as 'Docker Host' in Windows. If you open VirtualBox you will see a Virtual Machine called 'default'.

We can manage the Virtual Machine with docker-machine command.

To get information about machines, Type:

docker-machine ls

To Stop default machine, Type:

docker-machine stop default

To start default machine, Type:

docker-machine start default

Run Hello World Docker container on Windows 10

To test Windows Docker Engine, let's run a simple hello-world container on docker.

docker run hello-world

Docker will download the hello-world Docker Image and start a new container using the hello-world image. If successful you should see the "Hello from Docker" message as shown in the following image.

Windows Docker Container hello-world

This confirms that your Docker installation on Windows 10 / 7 / Server 2016 is successful.