Hands-On Kubernetes on Windows
上QQ阅读APP看书,第一时间看更新

LinuxKit and MobyLinuxVM

Docker for Windows (which was the initial name of Docker Desktop for Windows at that time) eventually came with a dedicated Hyper-V virtual machine based on LinuxKit named MobyLinuxVM. The purpose of this virtual machine is to provide a minimal runtime for Linux containers that can technically be run side by side with Windows containers.

By default, Docker Desktop for Windows runs in Linux containers mode, which utilizes MobyLinuxVM. In order to switch to Windows containers mode, you have to navigate to the Docker Desktop tray icon and select Switch to Windows containers.... Docker will restart and switch to native Windows containers.

In this solution, MobyLinuxVM runs its own Docker daemon and technically acts as a separate container host enclosed inside a virtual machine. Similarly, Windows has its own Docker Daemon that's responsible for Windows containers and also provides the Docker Client (CLI), which communicates with both Docker Daemons. This architecture can be seen in the following diagram:

Now, let's take a look at a more up-to-date approach for running Linux containers on Windows: LinuxKit LCOW.