How to Run 🐧 Linux Containers on Windows Server 2019

Hello again everyone ! This article will serve as part 5 of our β€œ Definitive Guide to Containers for MSPs ” serial. once again, this series is focusing on the new containerization technologies entering the industry today and looking at them through the lens of an MSP .
therefore far we ’ ve done quite a bite of how-to, and we ’ rhenium going to continue to work on the how-to question for the future few segments. The reason being, when we start talking about things like pricing, service pitch, and ongoing support, you need to have a impregnable grasp of what ’ s involved in the platform, so you can make inform decisions at that decimal point. With that in beware we ’ rhenium going to look at stevedore itself for another segment or two, and then we ’ ll originate getting into container orchestrators like Kubernetes .
Let ’ s see what we ’ ve talked about thus far .

The Definitive Guide to Containers for MSPs

part 1 – What are Containers ?

region 2 – Platforms for Running Containerized Workloads
part 3 – Introduction to Docker
part 4 – 4 Pro Tips when Working with Docker
For this segment specifically, I wanted to cover how to run Linux containers on Windows Server 2019. I came up with this theme as I was prepping for our latest webinar that centered around demonstration with Windows Server 2019. While it ’ sulfur easy enough to run containers on Windows 10 as we did in Part 3, it ’ south more unmanageable to do it on a VM where there is no GUI, and you can ’ t just install stevedore for Windows .
so, let ’ s take a expect at how the installation process works, and then we ’ ll go with running a container on top of it. once this is complete, you ’ ll have everything you need to run Linux and Windows containers on Windows Server ( assuming you ’ ve read the previous segments. Let ’ s receive Started .

How to Install Docker Enterprise Edition Preview on Windows Server 2019

In prepping for this article, I started with a newly installed Windows Server 2019 box. I used the GA Evaluation media to install the OS, then I upgraded to the latest Nov. build using Windows Update. In our previous segments we installed the Community version of Docker. For this especial feature, we need to install Docker Enterprise Edition and the preview let go of at that .
First off, if you ’ re using the same box as you did in previous segments you ’ ll want to remove the version of Docker we installed with the DockerMSFTProvider in PowerShell .
NOTE: If you ’ re starting with a bracing server you can skip this tone .
To Remove the former adaptation of Docker run the below command in an elevated PowerShell window :

Uninstall-Package -Name docker -ProviderName DockerMSFTProvider

then reboot the corner .
nowadays that we have a fairly slate we can install the need version of Docker to run Linux Containers. You can walk through the how-to below, or scroll down to watch the video .
NOTE: We ’ rhenium going to be installing a testing build of the stevedore engine. While it ’ s fine for testing and teach, I would highly suggest waiting until a stable version is released prior to using it in production .
NOTE: It is required to have the Hyper-V Role installed in order to install the Docker Enterprise Edition preview. If this is a testing VM, make sure you enable nest virtualization .
To install the stream preview human body of Docker Enterprise Edition we need to run the under :

Install-Module DockerProvider


Install-Package Docker -ProviderName DockerProvider -RequiredVersion preview

Reboot your machine once again .
See it in action!
How to Install Docker Enterprise Edition Preview on Windows Server 2019

How to Configure Docker Enterprise Edition to Run Linux Containers

Out of the box, this install of Docker will run Windows Containers. In order to switch back and away between Windows and Linux containers you need to run the below commands :
To switch to Linux Containers

[Environment]::SetEnvironmentVariable("LCOW_SUPPORTED", "1", "Machine")
Restart-Service docker

To switch back to Windows Containers

[Environment]::SetEnvironmentVariable("LCOW_SUPPORTED", $null, "Machine")
Restart-Service docker

Simply switch to whichever mode meets your needs at the given time .

Running Linux Containers on Windows Server 2019

After installing the Docker Enterprise Edition Preview and configuring it to run Linux containers we can use some of the syntax that we covered in previous sections to pull and run a container
Assuming you ’ ve switch to Linux mode, the below should work. Let ’ s inaugural pull the latest Debian Linux container image :
NOTE: You can walk through the how to below, or scroll down to watch the video

Docker pull Debian

then let ’ s run it in interactional modality and run a text-based app actually quick fair to make certain it works .

Docker run -it --name Debian_test Debian

once in the prompt running the downstairs will show us which version of the linux kernel is in habit

Uname -r

finally let ’ s install elinks, a text based web browser, using Debian ’ sulfur box utility Apt

Apt-get update

Apt-get install elinks

then let ’ s exposed google in elinks :


hopefully, it should be working !
See it in Action!
Running Linux Containers on Windows Server 2019


There you have it ! You ’ ve successfully run a Linux container on top of Windows Server 2019. Pairing this with what we ’ ve done in the previous segments should have you prepared to run both Windows and Linux containers with stevedore. Knowing this, we ’ ll traverse fair a few more advanced stevedore items in the next post before getting into container orchestrators .
If you had troubles with this or have questions on use-case, or merely have a general comment, be sure to let me know in the comments section below !
Until next time !
Was this helpful ?
It wasn ’ triiodothyronine accurate
It wasn ’ triiodothyronine open
It wasn ’ thymine relevant

Provide feedback about this article

source :
Category : Tech

About admin

I am the owner of the website, my purpose is to bring all the most useful information to users.

Check Also


Manage participants in a zoom meeting webinar

Call the people who attend the meet as follows Alternate host host Who scheduled the …

Leave a Reply

Your email address will not be published.