Windows版Docker如何运行Linux容器? [英] How does Docker for Windows run Linux containers?

查看:575
本文介绍了Windows版Docker如何运行Linux容器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows的旧版本Docker中,我记得它明确表示它使用Linux VM作为内核。

In the old versions of Docker for Windows, I remember it explicitly said it used a linux VM for the kernel.

但是,由于新的稳定版本(发布于我认为是2016年7月)。

But since the new stable version (released in July 2016 I think), it says

Docker for Windows是本机Windows应用程序,具有本机用户界面和自动更新功能,深度集成使用Windows本机虚拟化,Hyper-V,网络和文件系统

如果我理解正确,则指定的基本映像用于用户空间和主机的内核被使用。
因此,如果我指定使用ubuntu基本映像运行echo命令,那么Windows内核将如何发挥作用?

If I understand correctly, the specified base image is for the user space and the host's kernel is used. So, if I specify that I'm using an ubuntu base image to run the echo command, how does the Windows kernel come into play?

我完全误会了什么?

推荐答案

适用于Windows的Docker仍使用Linux VM运行Linux容器。但是,Linux VM不是使用Virtual Box(与Docker Toolbox一起使用),而是使用Hyper-V(Windows本地管理程序)运行。这意味着适用于Windows的Docker交付的组件更少,活动部件更少。

Docker for Windows still uses a Linux VM to run Linux containers. But instead of using Virtual Box (which is what is used with Docker Toolbox), the Linux VM is run using Hyper-V - a Windows-native hypervisor. This means that Docker for Windows ships fewer components and has less moving parts.

如果您安装Windows的Docker并运行 docker版本,您会看到Docker Linux守护进程正在 Moby Linux上运行。

If you install Docker for Windows and run docker version you'll see that the Docker Linux daemon is running on "Moby Linux".

这篇关于Windows版Docker如何运行Linux容器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆