Install Docker Engine - Enterprise on Windows Servers

Estimated reading time: 6 minutes

Docker Engine - Enterprise enables native Docker containers on Windows Server. Windows Server 2016 and later versions are supported. The Docker Engine - Enterprise installation package includes everything you need to run Docker on Windows Server. This topic describes pre-install considerations, and how to download and install Docker Engine - Enterprise.

Release notes

Release notes for all versions

System requirements

Windows OS requirements around specific CPU and RAM requirements also need to be met as specified in the Windows Server Requirements. This provides information for specific CPU and memory specs and capabilities (instruction sets like CMPXCHG16b, LAHF/SAHF, and PrefetchW, security: DEP/NX, etc.).

  • OS Versions: Server 2016 (Core and GUI), 1709 and 1803
  • RAM: 4GB
  • Disk space: 32 GB minimum recommendation for Windows. An additional 32 GB of Space is recommended for base images for ServerCore and NanoServer along with buffer space for workload containers running IIS, SQL Server and .Net apps.

Install Docker Engine - Enterprise

Docker Engine - Enterprise requires Windows Server 2016, 1703, or 1803. See What to know before you install for a full list of prerequisites.

  1. Open a PowerShell command prompt, and type the following commands.

    Install-Module DockerMsftProvider -Force
    Install-Package Docker -ProviderName DockerMsftProvider -Force
    
  2. Check if a reboot is required, and if yes, restart your instance:

    (Install-WindowsFeature Containers).RestartNeeded
    

    If the output of this command is Yes, then restart the server with:

    Restart-Computer
    
  3. Test your Docker Engine - Enterprise installation by running the hello-world container.

    docker run hello-world:nanoserver
    
    Unable to find image 'hello-world:nanoserver' locally
    nanoserver: Pulling from library/hello-world
    bce2fbc256ea: Pull complete
    3ac17e2e6106: Pull complete
    8cac44e17f16: Pull complete
    5e160e4d8db3: Pull complete
    Digest: sha256:25eac12ba40f7591969085ab3fb9772e8a4307553c14ea72d0e6f98b2c8ced9d
    Status: Downloaded newer image for hello-world:nanoserver
    
    Hello from Docker!
    This message shows that your installation appears to be working correctly.
    

(optional) Make sure you have all required updates

Some advanced Docker features, such as swarm mode, require the fixes included in KB4015217 (or a later cumulative patch).

sconfig

Select option 6) Download and Install Updates.

FIPS 140-2 cryptographic module support

Federal Information Processing Standards (FIPS) Publication 140-2 is a United States Federal security requirement for cryptographic modules.

With Docker EE Basic license for versions 18.09 and later, Docker provides FIPS 140-2 support in Windows Server 2016. This includes a FIPS supported cryptographic module. If the Windows implementation already has FIPS support enabled, FIPS is automatically enabled in the Docker engine.

NOTE: FIPS 140-2 is only supported in the Docker EE engine. UCP and DTR currently do not have support for FIPS 140-2.

To enable FIPS 140-2 compliance on a system that is not in FIPS 140-2 mode, do the following in PowerShell:

[System.Environment]::SetEnvironmentVariable("DOCKER_FIPS", "1", "Machine") 

Restart the Docker service by running the following command.

net stop docker
net start docker

To confirm Docker is running with FIPS-140-2 enabled, run the docker info command:

Labels:    
 com.docker.security.fips=enabled 

NOTE: If the system has the FIPS-140-2 cryptographic module installed on the operating system, it is possible to disable FIPS-140-2 compliance. To disable FIPS-140-2 in Docker but not the operating system, set the value "DOCKER_FIPS","0" in the [System.Environment].`

Use a script to install Docker EE

Use the following steps when you want to install manually, script automated installs, or install on air-gapped systems.

  1. In a PowerShell command prompt, download the installer archive on a machine that has a connection.

    # On an online machine, download the zip file.
    invoke-webrequest -UseBasicparsing -Outfile docker-17.06.2-ee-17.zip https://download.docker.com/components/engine/windows-server/2.1/docker-17.06.2-ee-17.zip
    
  2. Copy the zip file to the machine where you want to install Docker. In a PowerShell command prompt, use the following commands to extract the archive, register, and start the Docker service.

    #Stop Docker service
    Stop-Service docker
        
    # Extract the archive.
    Expand-Archive docker-17.06.2-ee-17.zip -DestinationPath $Env:ProgramFiles -Force
    
    # Clean up the zip file.
    Remove-Item -Force docker-17.06.2-ee-17.zip
    
    # Install Docker. This requires rebooting.
    $null = Install-WindowsFeature containers
    
    # Add Docker to the path for the current session.
    $env:path += ";$env:ProgramFiles\docker"
    
    # Optionally, modify PATH to persist across sessions.
    $newPath = "$env:ProgramFiles\docker;" +
    [Environment]::GetEnvironmentVariable("PATH",
    [EnvironmentVariableTarget]::Machine)
    
    [Environment]::SetEnvironmentVariable("PATH", $newPath,
    [EnvironmentVariableTarget]::Machine)
    
    # Register the Docker daemon as a service.
    dockerd --register-service
    
    # Start the Docker service.
    Start-Service docker
    
  3. Test your Docker EE installation by running the hello-world container.

    docker container run hello-world:nanoserver
    

Install a specific version

To install a specific version, use the RequiredVersion flag:

Install-Package -Name docker -ProviderName DockerMsftProvider -Force -RequiredVersion 18.09
...
Name                      Version               Source           Summary
----                      -------               ------           -------
Docker                    18.09.0               Docker           Contains Docker Engine - Enterprise for use with Windows Server...

Updating the DockerMsftProvider

Installing specific Docker EE versions may require an update to previously installed DockerMsftProvider modules. To update:

Update-Module DockerMsftProvider

Then open a new Powershell session for the update to take effect.

Update Docker Engine - Enterprise

To update Docker Engine - Enterprise to the most recent release, specify the -RequiredVersion and -Update flags:

Install-Package -Name docker -ProviderName DockerMsftProvider -RequiredVersion 18.09 -Update -Force

The required version must match any of the versions available in this json file: https://dockermsft.blob.core.windows.net/dockercontainer/DockerMsftIndex.json

Preparing a Docker EE Engine for use with UCP

Run the UCP installation script for Windows.

Start the Docker service:

Start-Service Docker

About Docker Engine - Enterprise containers and Windows Server

Looking for information on using Docker Engine - Enterprise containers?

Where to go next

  • Getting started provides an overview of Docker for Windows, basic Docker command examples, how to get help or give feedback, and links to all topics in the Docker for Windows guide.

  • FAQs provides answers to frequently asked questions.

  • Release Notes lists component updates, new features, and improvements associated with Stable and Edge releases.

  • Learn Docker provides general Docker tutorials.

  • Windows Containers on Windows Server is the official Microsoft documentation.

Windows, Windows Server, install, download, ucp, Docker Engine - Enterprise