Reputation: 2169
Since v20.10 Docker has deprecated the use of LCOW, therefore the opportunity to run both Linux & WIndows containters on Windows Server has been restrcited.
As they state :
The experimental feature to run Linux containers on Windows (LCOW) was introduced as a technical preview in Docker 17.09. While many enhancements were made after its introduction, the feature never reached completeness, and development has now stopped in favor of running docker natively on Linux in WSL2.
Developers who want to run Linux workloads on a Windows host are encouraged to use Docker Desktop with WSL2 instead.
Does that means, that on production we are encouraged to migrate from DockerEE to Docker Desktop? It seems like a step backwards, no?
Upvotes: 5
Views: 1502
Reputation: 2197
I will try to put together the information I have found so far, I encourage others to modify or comment in case I get something wrong. The whole container situation on Windows is confusing to say the least.
This is unsupported for Windows Server. You can certainly install it and it will run, but it is not meant for a server environment. When Docker Desktop is closed, the Docker engine is also shut down.
A nice part of Docker Desktop is the ability to switch between Windows or Linux containers though. It's as simple as right clicking on the tray icon and clicking "Switch to windows containers.." or "Switch to Linux containers..".
This is one of the easy solutions as it's just a matter of running a script to get it up and running. But, from what I gather, it can only run Windows containers and not Linux containers. There is no apparent way to switch that, it may be possible in some way though. Most articles I could find mention using DockerCLI.exe to change to Linux, but that is a Docker Desktop tool and not bundled with Docker CE.
Here is the MS documentation how to setup Docker CE: https://learn.microsoft.com/en-us/virtualization/windowscontainers/quick-start/set-up-environment?tabs=dockerce#windows-server-1
This was formerly known as Docker EE, and is basically Docker CE but bundled with additional features for an enterprise environment. I have never tried it out, but from what I gather it only executes Windows containers on a Windows host, same as Docker CE.
This is the solution if you need to run Linux containers. Basically you just need to set up WSL 2 and install Docker on it. This blog article describes the installation process.
What I found interesting however, is the following excerpt from a Mirantis blog article:
[...] You can run Linux containers on Windows using Windows Subsystem for Linux, but it usually isn’t the smoothest experience and we don’t recommend it for running production workloads—this is mostly useful for development. [...]
Source: https://www.mirantis.com/blog/so-you-want-to-run-windows-containers/
Another SO answer reflects this: https://stackoverflow.com/a/76149745/1244910
If you want to run Windows containers on a server, you can use Docker CE or Mirantis Container Environment (formerly known as Docker EE). if you want to run Linux containers, you can use WSL2 - but doing so in a production environment is not recommended.
Upvotes: 0