Can I mix linux-based and windows-based containers in same docker engine host?

左心房为你撑大大i 提交于 2019-12-01 18:07:17

问题


I'm using Docker Desktop for Windows 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?


回答1:


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/



来源:https://stackoverflow.com/questions/41010604/can-i-mix-linux-based-and-windows-based-containers-in-same-docker-engine-host

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!