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
then
Install-Package Docker -ProviderName DockerProvider -RequiredVersion preview
Reboot your machine once again .
See it in action!
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 :
Elinks https://www.google.com
hopefully, it should be working !
See it in Action!
Wrap-Up
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 ?
Yes
No
It wasn β triiodothyronine accurate
It wasn β triiodothyronine open
It wasn β thymine relevant
Provide feedback about this article