Docker for Windows和Docker在Windows上有什么区别? [英] What's the difference between Docker for Windows and Docker on Windows?

查看:243
本文介绍了Docker for Windows和Docker在Windows上有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Windows上的Docker 似乎是内置的Windows Server 2016?并支持在Docker容器内运行Windows,并使用Windows作为Docker容器主机。这是否支持Linux?我不这么认为,我认为它只支持运行Windows Docker容器。这也似乎由Microsoft维护。

Docker on Windows appears to be what's coming built into Windows Server 2016? and supports running Windows inside a Docker container and using Windows as a Docker container host. Does this support Linux? I don't think so, I think it only supports running Windows Docker containers. This also appears to be maintained by Microsoft.

似乎是由Docker团队创建的一个单独的安装,以将Linux Docker引入Windows。所以Windows可以是Docker主机,但所有容器仍然只是普通的Linux容器。这是否支持Windows容器?我不这么认为,我认为它只支持运行Linux Docker容器。这也似乎由Docker维护。

Docker for Windows appears to be a separate install created by the Docker team to bring Linux Docker to Windows. So Windows can be the Docker host but all containers are still just normal Linux containers. Does this support Windows containers? I don't think so, I think it only supports running Linux Docker containers. This also appears to be maintained by Docker.

另一个有趣的注释是 Visual Studio的Docker工具似乎只支持Windows的Docker,而Windows上不支持Docker。

One other interesting note is that Docker Tools for Visual Studio appears to only support Docker for Windows and not Docker on Windows.

我真正寻找的是两者之间的区别,有些比较好。每个人都试图达到什么功能,它们在哪里相似,它们在哪里不同。他们总是会不一样,还是会一起来的?

What I'm really looking for are the stated differences bettwen the two, some sort of good comparison. What features are each trying to acheive, where are they similar, where are they different. Will they always be different or will they ever come together?

推荐答案

Windows上的Docker 是一个口语方式来引用刚刚在Windows上运行的Docker Engine 。我认为这是一个 Windows容器主机有用,所以只有 Windows容器。这将是您将在Windows Server 2016机器上运行的。所以也许一个更好的名字是 Windows Server的Docker ,我相信人们也使用了。我还是喜欢Windows容器主机。这意味着它只能在一天结束时使用Docker Engine,甚至不需要任何Docker客户端(docker CLI,docker-compose等)。

Docker on Windows is a colloquial way to refer to just the Docker Engine running on Windows. I find it helpful to think of this as a Windows Container Host, so yes Windows containers only. This would be what you would run on a Windows Server 2016 machine. So maybe a better name is Docker for Windows Server which I believe people have used as well. I still prefer a Windows Container Host. Which means it only has the Docker Engine at the end of the day, doesn't even need to have any of the Docker clients (docker CLI, docker-compose, etc).

适用于Windows的Docker 是用于在Windows 上运行Linux和Windows容器的产品。它不是用于生产环境,而是用于Windows的桌面/客户端SKU,因此是Windows 10的要求。因此,您可以将其视为Windows 10的Docker。由于DfW可以运行两种容器类型,因此在您的计算机上设置了不同的配置:

Docker for Windows is a product meant for running both Linux and Windows containers on Windows. It's not meant for a production environment, and instead is meant for a desktop/client SKU of Windows, hence the Windows 10 requirement. So you could think of this as Docker for Windows 10. Because DfW can run both container types, there are different configurations that it sets up on your machine:


  • 当使用Linux Containers时,DfW会创建一个带有Hyper-V的MobyLinuxVM,在其中运行Linux容器,就像在Windows 10主机上运行一样透明地运行Linux容器。

  • 当使用Windows Containers时,DfW在Windows上安装与Docker相同的组件,以便您具有Windows容器主机。您现在有Windows Docker Engine设置。这样就可以在Win 10客户端SKU上运行Windows容器。

理论上你可以在Windows Server上安装DfW,我还没有尝试过,我不知道这是否会失败,但为什么你想在生产中的Windows主机上运行Linux容器?在生产中,您将拥有运行Linux容器的Linux容器主机和运行Windows容器的Windows容器主机,这将避免开销并简化事情。

Theoretically you could install DfW on Windows Server, I haven't tried so I don't know if this would fail, but why would you want to run Linux containers on a Windows Host in production? In production, you would have Linux Container Hosts that run linux containers and Windows Container Hosts that run windows containers, this would avoid overhead and simplify things.

这篇关于Docker for Windows和Docker在Windows上有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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