我可以在同一个Docker引擎主机中混合基于Linux和基于Windows的容器吗? [英] Can I mix linux-based and windows-based containers in same docker engine host?

查看:144
本文介绍了我可以在同一个Docker引擎主机中混合基于Linux和基于Windows的容器吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



使用Windows Containers的新功能,现在基于Windows的容器是可以的,但是它提出了这个问题?我可以将基于Linux的和基于Windows的图像混合在一起同一码头发动机主机?
如果是,将要运行所有网络功能?
这是独立于用户的主机操作系统吗?

解决方案

不,你不能。您将需要一个Linux来启动Linux容器和Windows Server 2016才能启动Windows容器



我在在Docker for Windows中运行正常的Win32应用程序



如果您有Windows Server 2016,您将能够启动Windows容器(您将需要一个Linux服务器来启动Linux容器)。



查看这些链接

p>

https:/ /msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/manage_docker



https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/container_setup



https://msdn.microsoft。 com / en-us / virtualization / windowscontainers / containers_welcome



在Windows中,您的Dockerfile将以

开头

FROM windowsservercore



而不是更常见的



FROM debian或FROM ubuntu



查看(Windows)Docker中的IIS示例



https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/manage_docker



或Docker中的SQL Server



http://26thcentury.com/2016/01/03/dockerfile-to-create-sql-server-express -Windows-C ontainer-image /


With the new feature of Windows Containers now Windows-based containers are possible but it raised this question?

Can I mix linux-based and windows-based images in same docker engine host? If yes, are going to work all network features? Is this independent of the host OS for the user?

解决方案

No you can't. You will need a Linux to launch Linux containers and a Windows Server 2016 to launch Windows containers

I said in Run normal Win32 applications in Docker for Windows

if you have Windows Server 2016, you will be able to launch Windows containers (and you will need a Linux server to launch Linux containers).

See those links

https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/manage_docker

https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/container_setup

https://msdn.microsoft.com/en-us/virtualization/windowscontainers/containers_welcome

In Windows, your Dockerfile will start with

FROM windowsservercore

instead of the more usual

FROM debian or FROM ubuntu

See some examples of IIS in (Windows) docker

https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/manage_docker

or a SQL Server in docker

http://26thcentury.com/2016/01/03/dockerfile-to-create-sql-server-express-windows-container-image/

这篇关于我可以在同一个Docker引擎主机中混合基于Linux和基于Windows的容器吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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