Get Started: Configure Your Environment for Containers

This quickstart demonstrates how to:

  • Set up your environment for containers
  • Run your first container image
  • Containerize a simple .NET core application

Prerequisites

Please make sure you meet the following requirements:

  • One computer system (physical or virtual) running Windows Server 2016 or later.

Note

If you are using Windows Server 2019 Insider Preview, please update to Window Server 2019 Evaluation.

Install Docker

Docker is the definitive toolchain for working with Windows containers. Docker offers a CLI for users to manage containers on a given host, build containers, remove containers, and more. Learn more about Docker in the Concepts area of our docs.

On Windows Server, Docker is installed through a OneGet provider PowerShell module published by Microsoft called the DockerMicrosoftProvider. This provider:

  • enables the containers feature on your machine
  • installs the Docker engine and client on your machine.

To install Docker, open an elevated PowerShell session and install the Docker-Microsoft PackageManagement Provider from the PowerShell Gallery.

Install-Module -Name DockerMsftProvider -Repository PSGallery -Force

Next, use the PackageManagement PowerShell module to install the latest version of Docker.

Install-Package -Name docker -ProviderName DockerMsftProvider

When PowerShell asks you whether to trust the package source 'DockerDefault', type A to continue the installation. After the installation complete, you must reboot the computer.

Restart-Computer -Force

Tip

If you want to update Docker later:

  • Check the installed version with Get-Package -Name Docker -ProviderName DockerMsftProvider
  • Find the current version with Find-Package -Name Docker -ProviderName DockerMsftProvider
  • When you're ready, upgrade with Install-Package -Name Docker -ProviderName DockerMsftProvider -Update -Force, followed by Start-Service Docker

Next Steps

Now that your environment has been configured correctly, follow the link to learn how to pull and run a container.