简体   繁体   English

Windows 上的 Linux 容器 (LCOW) 功能与在 Windows 上运行 Linux VM

[英]Linux Containers on Windows (LCOW) feature vs Running Linux VM on Windows

I trying to understand why LCOW feature is actually needed.我试图理解为什么实际上需要 LCOW 功能。

I could run Hyper-V Linux VM on my Windows, and inside it run Docker with Linux containers (correct?)我可以在我的 Windows 上运行 Hyper-V Linux VM,并在其中运行带有 Linux 容器的 Docker(对吗?)

I looking into Linux Containers documentation , and it looks like not-so-mature at best (eg " Known Issues ")我查看了Linux Containers 文档,它充其量看起来并不成熟(例如“ 已知问题”)

So, which benefits LCOW provides over just running Linux VM with Docker inside?那么,LCOW 比仅运行带有 Docker 的 Linux VM 提供了哪些好处?

The only reason that LCOW was actually needed is that if you want to run both Windows and Linux containers side by side.实际需要 LCOW 的唯一原因是,如果您想同时运行WindowsLinux容器。

  1. With Linux VM, you can only run Linux containers.使用 Linux VM,您只能运行 Linux 容器。
  2. If you wish to run Windows containers you have to install Docker Deamon on windows as well.如果你想运行 Windows 容器,你还必须在 Windows 上安装 Docker Deamon。
  3. With LCOW, there will be only One Docker Daemon (Docker Host) running on windows managing both Windows and Linux containers.使用 LCOW,将只有一个Docker 守护程序(Docker 主机)在 Windows 上运行,同时管理 Windows 和 Linux 容器。

To understand in detail, there is a similar thread on Stackoverflow.要详细了解,Stackoverflow 上有一个类似的线程。 What's the difference between Docker for Windows and Docker on Windows? Windows 版 Docker 和 Windows 版 Docker 有什么区别?

If you don't wish to run Windows containers then you really don't need LCOW.如果您不想运行 Windows 容器,那么您真的不需要 LCOW。

LCOW is deprecated and replaced with WSL (Windows Subsystem for Linux). LCOW 已被弃用并替换为 WSL(适用于 Linux 的 Windows 子系统)。 The latest version is WSL2 and Docker for Windows Desktop has support for it.最新版本是 WSL2,Windows 桌面版 Docker 支持它。

https://docs.microsoft.com/en-us/windows/wsl/about https://docs.microsoft.com/en-us/windows/wsl/about

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM