Are there any update to date guides on how to use Linux containers in Docker EE for Windows Server 2016? All guides I have found (such as this one) are using the preview edition which from what I can tell is two major releases and 2 years out of date.
An additional problem I have is that I have to download and install docker manually as the server doesn't have a direct internet connection. Container images will be downloaded via Artifactory.
Docker Engine - Enterprise is available at no additional cost to all Windows Server 2016 customers. Docker works the same way on Windows as it does on Linux: leverage the same Docker CLI, API, image format, and Docker registry services for both Windows and Linux images in the same cluster.
Docker Enterprise Edition is supported for use with Enterprise Server only on Windows Server 2016 so if you are using Windows 10 you must install Docker Desktop.
Docker has been able to run Linux containers on Windows desktop since it was first released in 2016 (before Hyper-V isolation or Linux containers on Windows were available) using a LinuxKit based virtual machine running on Hyper-V.
With the release of WSL 2, please be mindful that parts (if not all) off the below is very likely to be outdated.
Original post:
I previously forgot to mention that before you install, you need to have the Hyper-V Role installed. If you server is a VM, make sure that you have enabled nested virtualization.
I don't know of any updated guides, but I have come up with the following from various sources (sources in the bottom), which is confirmed to work for running LCOW on Windows Server 2019:
Basically, you install a normal up-to-date Docker, enable experimental and fix the kernel path.
Assuming that Docker is not already installed, and never has been, running the following commands in an elevated PowerShell get you there:
PS C:\...> Install-Module DockerMsftProvider -Force
PS C:\...> Install-Package Docker -ProviderName DockerMsftProvider -Force
PS C:\...> Restart-Computer
PS C:\...> $configfile =@"
{
"experimental":true
}
"@
PS C:\...> $configfile|Out-File -FilePath c:\ProgramData\docker\config\daemon.json -Encoding ascii -Force
PS C:\...> [Environment]::SetEnvironmentVariable("LCOW_SUPPORTED", "1", "Machine")
PS C:\...> Restart-Service Docker
Then you need to go to https://github.com/linuxkit/lcow/releases and download the newest release and unpack it to C:\Program Files\Linux Containers
.
If necessary, rename the file bootx64.efi
to kernel
.
Please check out the last of the sources that mention some applications that will not work. I am still struggling with switching it to the old method of running the containers in a Moby VM for this specific reason.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With