16

I have used docker for windows with linux containers on windows 10 sucessfully - but now I want to use a new shiny Windows Server 2016 for that task - but how?

I have installed the docker features using this guide: https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/quick_start_windows_server

Installing the normal docker.msi fails because the windows version ist not Windows 10.

Unfortunately, when trying to run any linux vm docker throws the error:

image operating system "linux" cannot be used on this platform.

In the docker beta I could switch between using windows containers or linux containers - but how I can do that on Server 2016= There is no tray icon or else.

abronan
  • 3,309
  • 4
  • 29
  • 38
Christian Sauer
  • 10,351
  • 10
  • 53
  • 85
  • Did you take a look at: [Can I mix Linux based and windows based containers in same docker engine host?](http://stackoverflow.com/questions/41010604/can-i-mix-linux-based-and-windows-based-containers-in-same-docker-engine-host)? – abronan Dec 07 '16 at 08:29
  • @abronan I know that mixing is not possible atm. I don't want to do that. I want to run linux containers under WS 2016. This is possible on W10 - there the docker container(s) run inside a small VM. You can then switch between this VM and running native Windows containers. But i unable to figure out how to configure that on WS 2016 – Christian Sauer Dec 07 '16 at 09:22
  • 1
    I am also searching for this, hopefully there is a PowerShell command that can make the switch (I could not install the GUI version of Docker). – Andrei Dec 08 '16 at 16:21
  • Possible duplicate of [Linux Docker container on Windows Server 2016](http://stackoverflow.com/questions/40995973/linux-docker-container-on-windows-server-2016) – William Denman Jan 19 '17 at 19:00
  • @WilliamDenman I trhink my question is older and has more content? maybe closing the other one? – Christian Sauer Jan 19 '17 at 19:30
  • @ChristianSauer agreed, we should keep whichever one is older. I might have possibly flagged the wrong one. – William Denman Jan 20 '17 at 18:27
  • @ChristianSauer I flagged this one because the other question was asked first. But I do now see your argument of your question being more complete. Given that I answered the other question, I'll remain impartial and leave it up to whoever addresses the flag. – William Denman Jan 20 '17 at 18:33

2 Answers2

8

It is now possible to run Linux containers on Windows Server 2016 although it's not as simple as running the Docker for Windows installer. Full instructions are in the following answer: Linux Docker container on Windows Server 2016

Community
  • 1
  • 1
Boggin
  • 3,251
  • 3
  • 33
  • 48
  • Hello Boggin, i am getting the error `C:\Program Files\Docker\docker.exe: no matching manifest for windows/amd64 10.0.14393 in the manifest list entries. See 'C:\Program Files\Docker\docker.exe run --help'.` while trying to install docker on windows server 2016. we took this VM from Azure. – BSG Aug 22 '19 at 19:02
4

Updated answer
Windows Server (from version 1709) now supports Linux Containers. For more information read:

https://blog.docker.com/2017/09/docker-windows-server-1709/

Old answer

Unfortunately, as of now (January 2017) I don't think it is possible.

Windows Server 2016 has native container support. These containers use the Windows kernel so it is only possible to run Windows processes. To run Linux containers you would need the MobyLinux VM.

For now you have to run Linux containers on Windows 10.

For more information read "2. You have to use Windows inside the containers (for now)" from this article by Elton Stonema. https://blog.sixeyed.com/windows-containers-and-docker-5-things-you-need-to-know/

And a similar question on Stack Overflow. Linux Docker container on Windows Server 2016

Paul Adam
  • 251
  • 1
  • 2
  • 11
  • That was'nt the question. I want to use the Linux VM, but die Tools where not installable in Januar. Are they now? – Christian Sauer Mar 23 '17 at 05:32
  • @ChristianSauer, still no native support for linux containers but with a few work arounds you can install the tools. See Boggins answer. – Paul Adam Sep 03 '17 at 05:22
  • I would not recommend using the Moby VM on Windows Server for production purposes. Since you are no longer running directly on the windows host there might be perfomance issues. – Paul Adam Sep 03 '17 at 05:30