简体   繁体   English

“Windows 上的 Docker”是否启动 linux 虚拟机?

[英]Does "Docker On Windows" launch a linux virtual machine?

I'm aware that the old Docker Toolbox uses VirtualBox to run a minimal linux virtual machine for Docker using boot2docker which is a minimal light-weight Linux OS.我知道旧的 Docker 工具箱使用 VirtualBox 使用boot2docker为 Docker 运行最小的 linux 虚拟机,这是一个最小的轻量级 Linux 操作系统。 Now, with the new Docker on Windows they claim that they use HyperVisor on Windows 10 Pro directly.现在,随着 Windows 上的新Docker,他们声称他们直接在 Windows 10 Pro 上使用 HyperVisor。

Does this mean the Docker on Windows package got rid of the Linux virtual machine totally, or is there still a Linux virtual machine being used on Windows?这是否意味着Windows 上的 Docker包完全摆脱了 Linux 虚拟机,或者 Windows 上仍然使用 Linux 虚拟机?

Not Really.. It uses a VM on the Hyper-V they call it MobyLinuxVM 不是真的..它在Hyper-V上使用VM,他们称之为MobyLinuxVM

在此输入图像描述

It uses an Alpine boot image which has Hyper-V Integration Services which allows communication between the Hyper-V Host and the Linux Guest (ie to retrieve the Guest IP and send two-way messages ) 它使用具有Hyper-V集成服务的Alpine启动映像,该服务允许Hyper-V主机和Linux Guest之间的通信(即检索来宾IP并发送双向消息)

A container is considered “native”, if it can run directly on the host operating system.如果容器可以直接在主机操作系统上运行,则它被认为是“本机的”。

Linux Container - A Linux application that runs in an isolated Linux environment. Linux Container - 在隔离的 Linux 环境中运行的 Linux 应用程序。 This same container can be run on a Windows OS using virtualization to emulate a Linux environment, but the container is still running on Linux.同样的容器可以在使用虚拟化模拟 Linux 环境的 Windows 操作系统上运行,但容器仍在 Linux 上运行。

Windows (Server) Container - A Windows application that runs in an isolated Windows environment. Windows(服务器)容器 - 在隔离的 Windows 环境中运行的 Windows 应用程序。

Docker on Windows to run a Linux container requires virtualization. Windows 上的 Docker 运行 Linux 容器需要虚拟化。 The available options are:可用的选项是:
VirtualBox (Docker Toolbox) VirtualBox(Docker 工具箱)
Hyper-V backend (Docker Desktop) Hyper-V 后端(Docker 桌面)
WSL2 backend (Docker Desktop) WSL2 后端(Docker 桌面)

The Container (and Docker ) terminology is very confusing, especially with Windows nuances. Container (和Docker )术语非常混乱,尤其是与 Windows 的细微差别。 See Docker Container in Linux and Windows for an overview with many useful reference links.请参阅Linux 和 Windows 中的 Docker 容器以获得包含许多有用参考链接的概述。

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

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