Как установить docker на windows server 2016

This multi-part blog series will show how to configure, build, and run Docker containers on Windows. The first part showed how to setup Windows Server 2016 on Virtual Box for Docker Containers. This part will install the operating system images and configure Docker. Instructions are available at msdn.microsoft.com/virtualization/windowscontainers/deployment/deployment.

How to Install Docker in Windows Server 2016 Container Feature

Start PowerShell:

windows-2016-docker-1-

Install the container feature:

windows-2016-docker-2

Restart the Virtual Machine:

windows-2016-docker-3

Install Windows Server 2016 Base Docker Image

Base operating system can be installed using ContainerImage PowerShell module. Install the module as:

windows-2016-docker-4

See the list of operating system images that are available:

windows-2016-docker-5

Install the Windows Server Core base OS image:

windows-2016-docker-6

windows-2016-docker-7

Install Docker on Windows Server 2016

Download the script to install Docker:

windows-2016-docker-8

Run the script:

windows-2106-docker-9

Check Docker version:

windows-2016-docker-11

Check the list of images and tag the base OS image to latest:

windows-2106-docker-10

Check docker --help command:

 windows-2016-docker-12

Subsequent blogs will show how other fun things with Docker on Windows Server 2016!

Some further topics to read …

  • Windows Server Containers – Quick Start
  • Windows Server 2016 Technology Preview 5
  • Docker Documentation
  • Getting Started with Docker for Java developers

Posted by Arun Gupta, VP, Developer Advocacy, Couchbase

Arun Gupta is the vice president of developer advocacy at Couchbase. He has built and led developer communities for 10+ years at Sun, Oracle, and Red Hat. He has deep expertise in leading cross-functional teams to develop and execute strategy, planning and execution of content, marketing campaigns, and programs. Prior to that he led engineering teams at Sun and is a founding member of the Java EE team.

Gupta has authored more than 2,000 blog posts on technology. He has extensive speaking experience in more than 40 countries on myriad topics and is a JavaOne Rock Star for three years in a row. Gupta also founded the Devoxx4Kids chapter in the US and continues to promote technology education among children. An author of several books on technology, an avid runner, a globe trotter, a Java Champion, a JUG leader, NetBeans Dream Team member, and a Docker Captain, he is easily accessible at @arungupta.

  • Dockerizing MCP – Bringing Discovery, Simplicity, and Trust to the Ecosystem

    Discover the Docker MCP Catalog and Toolkit, a new way to source, use, and scale with MCP tools.

    Read now

  • Securing Model Context Protocol: Safer Agentic AI with Containers

    Learn about the new challenges of MCP security, where many current MCP tools fall short, and how containers help maintain best practices.

    Read now

  • Introducing Docker MCP Catalog and Toolkit: The Simple and Secure Way to Power AI Agents with MCP

    With the Docker MCP Catalog and Toolkit, you can easily discover tools and connect with your favorite MCP clients.

    Read now

  • Simplifying Enterprise Management with Docker Desktop on the Microsoft Store

    Find Docker on the Microsoft Store for simplified installs, updates, and enterprise management with native Intune support and seamless deployment.

    Read now

Installing Docker on Windows Server 2016

First, install the Docker-Microsoft PacheManagement Provider from the PowerShell Gallery

PS> Install-Module -Name DockerMsftProvider -Repository PSGallery -Force

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

PS> Install-Package -Name Docker -ProviderName DockerMsftProvider

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

PS> Restart-Computer -Force

Install Docker-Compose

Make sure to include to correct docker-compose version

PS> Invoke-WebRequest https://github.com/docker/compose/releases/download/1.12.0/docker-compose-Windows-x86_64.exe -UseBasicParsing -OutFile $env:ProgramFiles\docker\docker-compose.exe

Uninistall

PS> Uninstall-Package Docker -ProviderName DockerMsftProvider
PS> Uninstall-Module -Name DockerMsftProvider

In this post, I want to show you how to install Docker on Windows Server 2016/2019. The process to install Docker in Windows Server is easy with the help of the PowerShell module of the OneGet provider.

Install Docker>

Install Docker

#

To install the Docker-Microsoft PackageManagement Provider from the PowerShell Gallery. Run the following PowerShell commands as administrator.

Install-Module `
    -Name DockerMsftProvider `
    -Repository PSGallery `
    -Force
Install-Module

Once the installation of DockerMsftProvider is complete, Use the Install-Package cmdlet with the following syntax to install Docker.

Install-Package `
    -Name docker `
    -ProviderName DockerMsftProvider
Docker Windows Server

Important: The provider enables the container feature on their server. When the installation is complete, reboot the server. Run the following PowerShell command as administrator.

Restart-Computer `
    -Force

Verify the Docker installation>

Verify the Docker installation

#

After installing the Docker package, you can run the following commands to verify that the installation was successful.

Windows Feature>

Windows Feature

#

To verify that the container feature is enabled, we will use the cmdlet Get-WindowsFeature with the following syntax:

Get-WindowsFeature `
    -Name Containers
get-windowsfeature

Docker Version>

Docker Version

#

To check the installed versions of docker, use the docker version command**.**

docker-version

Docker Properties>

Docker Properties

#

And finally, to confirm the Docker client-engine communication is working fine, run the command docker info.

docker-info

Deploy a Test Container>

Deploy a Test Container

#

Now that we have completed the installation and verified that everything is working correctly, we can run the first Windows container on Docker. Use the docker run command with the following syntax to download a sample image from the Docker Hub and deploy a container that runs a .Net “Hello World” application.

### Host version: Windows Server 2016
docker run microsoft/dotnet-samples:dotnetapp-nanoserver-sac2016

### Host version: Windows Server 2019
docker run microsoft/dotnet-samples:dotnetapp-nanoserver-1809
Docker Windows Server

Thanks for reading my post. I hope you find it useful.

If you want to know more about Windows containers, check out this
link
.


Readers help support Windows Report. We may get a commission if you buy through our links.

Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more

Docker is a useful tool, and many are wondering if it is possible to Install Docker on Windows Server 2016. Join us while we try to answer this question.

Is Docker supported on Windows Server?

Yes, Docker Community Edition/Moby is supported on Windows Server. You can also install containerd, or the Mirantis Container Runtime version.

How do I install Docker on Windows Server?

  1. Open PowerShell.
  2. Run the following commands: Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/Windows-Containers/Main/helpful_tools/Install-DockerCE/install-docker-ce.ps1" -o install-docker-ce.ps1
    .\install-docker-ce.ps1

  3. Follow the instructions on the screen to complete the process.

For containered, the steps are the same but you need to use the following commands instead:
Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/Windows-Containers/Main/helpful_tools/Install-ContainerdRuntime/install-containerd-runtime.ps1" -o install-containerd-runtime.ps1
.\install-containerd-runtime.ps1

Is Docker free for Windows Server 2016?

Yes, Docker is free on Windows Server and Docker Enterprise comes included with with Windows Server license.

Read more about this topic

  • Microsoft’s hotpatching for Windows Server 2025 to be subscription-based starting July
  • Microsoft Office Lens: A Powerful Tool for Capturing and Organizing Information
  • Microsoft releases the Windows Server Build 26360, introducing the WDAC for enhanced security

As you can see, it’s pretty simple to install Docker on Windows Server 2016, but issues with it can occur, and we wrote about Docker CLR error 8000405 and Docker Desktop unexpected WSL error.

Issues can appear on Windows 11 as well, and we have a guide on what to do if the Docker Desktop is starting forever, so don’t miss it.

Did you manage to install Docker? Let us know in the comments.


Aleksandar Ognjanovic

Aleksandar’s main passion is technology. With a solid writing background, he is determined to bring the bleeding edge to the common user. With a keen eye, he always spots the next big thing surrounding Microsoft and the Windows OS.

Focused on Windows errors and how to solve them, he also writes about the OS’s latest features as well as its interface.

In his free time, he likes to read, listen to music, and enjoy the nature. Hiking is one of his newly found passions.


Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Антивирус для windows 200
  • Epson 4300 драйвер windows 10
  • Что такое c windows kmsauto exe
  • Как сбросить горячие клавиши windows 10
  • Как переименовать учетную запись майкрософт в windows 10