Installing Docker In Windows Server

The following document will provide you the step by step guide to create a Windows Server operating system and install the docker in it. To proceed with this, you need to login to your Microsoft Azure portal.

Step 1 Windows Server VM Creation

Create a new Windows Server VM by going to New->Compute->Windows Server 2016 Data Center.

Windows Server

Enter some username and password by creating a new resource group and choosing some location.

Windows Server

Choose F8S Standard sized virtual machine in the next step.

Windows Server

In the Settings blade, choose the disk type to SSD and Boot diagnostics to NO. Then, create the VM.

Windows Server 

Windows Server

Once the VM gets created, log into the VM. Now, the next step is installing the docker.

Step 2 Installing Docker using PowerShell

  • Login to your Server VM and check for Windows updates. If any updates are found, install them first.

  • After finishing installation of updates, open PowerShell with administrator privileges. Then, run the following command to get the Docker module for Windows. While executing the below two commands, make sure to give permission as "Yes" when prompted for permission.

    Install-Module -Name DockerMsftProvider -Repository PsGallery -Force
  • Now, install the docker package from the gallery which we have installed now.

    Install-Package -Name docker -Providername DockerMsftProvider -Verbose
  • Once the installation gets done, restart your Server VM.

    Windows Server

Step 3 Starting Docker

  • Now, check whether Docker is running by using the command.
    Get-Service docker
  • If it doesn’t run, execute the following command.
    Start-Service docker
  • Now, execute the command.
    docker version

Windows Server

Thus, we have successfully installed the docker inside Windows Server VM.

Up Next
    Ebook Download
    View all
    Learn
    View all