Docker – How to Run Linux Docker Container on Windows Server 2019

dockerwindows-server-2019

There are already very similar Q&A regarding Windows Server 2016, but it remains unclear to me.

We have installed Docker Enterprise in version 18.09.6. We did manage to run Linux containers in experimental mode using LCOW. But experimental mode is disencouraged for production. Particularly we don't know if the issues regarding filesystem operations and databases mentioned at the end of https://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/linux-containers still exist.

So the question is how to run Linux containers in non-experimental mode (using MobyVM). Is this supported at all on Windows Server 2019? Are the answers in Docker Windows Server 2016 switch to linux container still valid?

Best Answer

One could use Docker for CE ie the same installer that works on WIN 10. But remember to use the version 2.1.0.3 instead of the version 2.0.0.3. The previous versions have some issues with Server 2019 and would not work fine.

The only supported way to run linux container on Docker EE is using the Hyper-V isolation method (LCOW) which in itself cumbersome and also there is no official documentation. One could follow the blogs mentioned below to run Linux Container on Windows Server 2019 (Remember the support is experimental and is not recommended for Production environment).

PS:

Windows/Docker are not coming up with a final strategy on how they would support Linux container. The Hyper-V isolation method to run Linux container was an idea proposed long back but still there is no final call on that. Refer to the link

We can use Docker for windows on server 2016 but soon the support for latest Docker version 2.1 will not be available. There has been no concrete documentation from Docker/Windows community about how they would support Linux container. Following the steps mentioned here will just provide Windows container support on Server 2016. Luckily we have a escape with server 2016 and Server 2019 using Docker for Windows Installer (Docker CE) but still its not a full proof solution.