How To Install Windows Containers On Windows Server 2016

In this blog post, I’ll show you how I Install Windows Containers on Windows Server Core 2016 and Server with GUI.

Windows Containers

Windows Containers allows us to run \ deploy Windows Containers Images using the Docker management engine for Containers.

Currently, Docker Is the most used Linux and Windows Containers management tools and also consider as the standard In the Industry.

The base Container Images available on Windows Containers are:

  • Windows Server Core 2016 Container Image
  • Windows Nano Server 2016 Container Image

Last time I checked the docker hub repository, I saw that Microsoft offers 30 Windows Container Images that Includes Images for IIS, SQL, .NET Core and many more.

In this article, I’m going to Install Windows Containers on Windows Server Core 2016 virtual machine running on Windows Nano Server 2016 Hyper-V host.

Container Host

The requirements for running Windows Containers are:

  • Hyper-V host
  • Windows Server 2016 OS only
  • Minimum 2GB of RAM
  • 2 X Core CPU
Nested Virtualization

Nested Virtualization enabled If using a Virtual Machine (see below how to enable)

Internet connection from the VM (needed to download Docker and Install Windows Containers)

Note: In order to run Windows Containers on a Hyper-V machine you will need to enable Nested Virtualization on the VM, to do so run the cmdlet below on the host and make sure you don’t enable dynamic RAM memory.

Set-VMProcessor -VMName 2016rtm -ExposeVirtualizationExtensions $true
Get-VMNetworkAdapter -VMName 2016rtm | Set-VMNetworkAdapter -MacAddressSpoofing On

Install Docker

Once the Server Is Installed and running I’ll Install Windows Containers and docker using two PowerShell cmdlets.

Install-Module -Name DockerMsftProvider -Repository PSGallery -Force

Next, run the cmdlet below to Install the Docker PowerShell Provider:

Install-Package -Name docker -ProviderName DockerMsftProvider

Once done, Restart the Server.

To check the Installed docker version type:

docker version

All done, In my next article, I’ll show you how I download a Windows Container Image and deploy a Windows Container.

This article was first published on