5
votes

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
It's still not possible to mix the two containers (Windows and Linux) but it is now possible to run Linux containers on W2016: Linux Docker container on Windows Server 2016Boggin

1 Answers

0
votes

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/