How to Run Linux Containers on Windows Server 2019

How to Run Linux Containers on Windows Server 2019

How to Run Linux Containers on Windows Server 2019. In previous articles we learned about running Docker Containers on Windows Server 2019. In this tutorial, we are going to teach you how to run Linux containers. You can Choose your perfect Windows VPS Server Packages from eldernode.

Docker on Windows only runs Windows container. To use Linux containers on Windows Server, you need to use the Docker Enterprise Edition Preview which includes a full LinuxKit system for running Docker Linux containers.


Tutorial Run Linux Containers on Windows Server 2019

1. In the first step, you have to uninstall your current Docker CE.

Uninstall-Package -Name docker -ProviderName DockerMSFTProvider 

2. If you’re running Docker Containers using Linux Virtual Machine running on Hyper-V, enable Nested Virtualization.

Get-VM WinContainerHost | Set-VMProcessor -ExposeVirtualizationExtensions $true 

3. In the third step, you must install the current preview build of Docker EE.

Install-Module DockerProvider Install-Package Docker -ProviderName DockerProvider -RequiredVersion preview 
Recommended Article: Tutorial Clear Local DNS Cache

4. In the fourth step, enable LinuxKit system for running Linux containers.

[Environment]::SetEnvironmentVariable("LCOW_SUPPORTED", "1", "Machine") 

5. Next you need to restart the docker after making the changes.

Restart-Service docker 

6. Test stage.

> docker run -it --rm ubuntu /bin/bash  [email protected]:/# cat /etc/os-release   NAME="Ubuntu"  VERSION="18.04.1 LTS (Bionic Beaver)"  ID=ubuntu  ID_LIKE=debian  PRETTY_NAME="Ubuntu 18.04.1 LTS"  VERSION_ID="18.04"  HOME_URL=""  SUPPORT_URL=""  BUG_REPORT_URL=""  PRIVACY_POLICY_URL=""  VERSION_CODENAME=bionic  UBUNTU_CODENAME=bionic   [email protected]:/# exit  exit 

7. Use the following commands to return to Windows containers.

[Environment]::SetEnvironmentVariable("LCOW_SUPPORTED", "$null", "Machine") 

Dear user, we hope you would enjoy this tutorial, you can ask questions about this training in the comments section, or to solve other problems in the field of Eldernode training, refer to the Ask page section and raise your problem in it as soon as possible. Make time for other users and experts to answer your questions.


We Are Waiting for your valuable comments and you can be sure that it will be answered in the shortest possible time.

    Leave Your Comment

    Your email address will not be published.

    We are by your side every step of the way

    Think about developing your online business; We will protect it compassionately

    We are by your side every step of the way


    7 days a week, 24 hours a day