In this blog post, I want to quickly guide you through how you can install a Windows Server Container Host running Docker. This guide will help you set up, install, and run Windows Containers on Windows Server. In my example, I will install a container host on a Windows Server, version 2004, which is a Semi-Annual Channel (SAC) release. Windows Server SAC releases are released twice a year and are optimized for containers. In the Windows Server, version 2004 release, the team continued improving fundamentals for the core container platform such as performance and reliability.
If you want to learn more about the differences of Windows Server Semi-Annual Channel (SAC) vs. Long-Term Servicing Channel (LTSC), check out my blog post.
- A virtual or physical server running Windows Server 2016 or higher (Also including Semi-Annual Channel (SAC) releases. In my blog post, I will use the latest available releases and run the latest Windows Server SAC release, which offers the latest enhancements on the container host.
- You can also use the Windows Server 2019 LTSC version
Set up and install the Windows Server Container Host
Since I am using the latest SAC release of Windows Server, the server is available as Windows Server Core only. This means I am going to use a tool called “sconfig” to set up my server for the first time. Of course, you can also use existing methods like unattend.xml files or PowerShell scripts to set up your server.
With sconfig, you can run all the simple configuration tasks to configure your Windows Server.
After the Windows Server is configured and patched, we can now install Docker, which is required to work with Windows containers. Docker consists of the Docker Engine and the Docker client. You can simply install Docker on Windows Server using the following commands.
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force Install-Package -Name docker -ProviderName DockerMsftProvider
After these commands, you will need to restart the server.
If you want to learn more about installing Docker on Windows Server, check out Microsoft Docs.
Now you can start pulling your docker container images to your Windows Server. I will use the latest Windows Container images, which came with Windows Server, version 2004. You can read more about the improved container images here.
docker pull mcr.microsoft.com/windows/servercore:2004 docker pull mcr.microsoft.com/windows/nanoserver:2004 docker pull mcr.microsoft.com/windows:2004
And yes, if you have a standalone Windows Server Core, you can also directly install Windows Admin Center on your Windows Server Core.
I hope this blog post gives you a great overview of how to install and set up a Windows Server container host. If you have any questions, feel free to leave a comment.Tags: 2004, Container, Container Host, Containers, Docker, Host, Images, install, Microsoft, PowerShell, Windows, Windows Server Last modified: June 25, 2020