问题
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