39

I have a Linux server with 16GB ram with docker host installed. I would like to deploy on it a Windows Server container. Is it possible? Anyone has just tried this solution?

1
  • Actually... this just might be possible today (Dec. 2016, 14 months later). See my revised answer. Commented Dec 12, 2016 at 20:00

1 Answer 1

42

Update 2019

As noted by duct_tape_coder in the comments:

Microsoft has improved the network options for containers and now allows multiple containers per pod with improved namespace.


In theory (original answer Oct 2015):

There is no "Windows container" running on a Linux host.
And a Linux container would not run directly on a Windows server, since it relies on system calls to a Linux kernel.

You certainly can run those Linux containers on any Windows machine through a VM.
That is what docker toolbox will install.

There will be support for docker on Windows soon, but that would be for Windows container, not Linux containers.

Update 2017: yes, LinuxKit allows to run a linux container through aa Hyper-V isolation wrapper on a Windows platform, through a minimal Linux OS built from linuxkit.
That is still the same idea: linux running inside a VM on Windows.
That is not a Linux server deployed on a Windows server: only deployed inside a Linux server running in a VM on Windows.


Actually... (update Dec. 2016)

See "Linux and Windows, living together, total chaos! (OK, Kubernetes 1.5)"

Kubernetes 1.5 includes alpha support for both Windows Server Containers, a shared kernel model similar to Docker, and Hyper-V Containers, a single-kernel model that provides better isolation for multi-tenant environments (at the cost of greater latency).
The end result is the ability to create a single Kubernetes cluster that includes not just Linux nodes running Linux containers or Windows nodes running Windows containers, but both side by side, for a truly hybrid experience.
For example, a single service can have PODs using Windows Server Containers and other PODs using Linux containers.

But:

Though it appears fully functional, there do appear to be some limitations in this early release, including:

  • The Kubernetes master must still run on Linux due to dependencies in how it’s written. It’s possible to port to Windows, but for the moment the team feels it’s better to focus their efforts on the client components.
  • There is no native support for network overlays for containers in windows, so networking is limited to L3. (There are other solutions, but they’re not natively available.)
    The Kubernetes Windows SIG is working with Microsoft to solve these problems, however, and they hope to have made progress by Kubernetes 1.6’s release early next year.
  • Networking between Windows containers is more complicated because each container gets its own network namespace, so it’s recommended that you use single-container pods for now.
  • Applications running in Windows Server Containers can run in any language supported by Windows. You CAN run .NET applications in Linux containers, but only if they’re written in .NET Core. .NET core is also supported by the Nano Server operating system, which can be deployed on Windows Server Containers.

Sign up to request clarification or add additional context in comments.

18 Comments

am i the only one that's interpreting the question as running a windows container on a Linux host docker engine.?
@OK9999 No you are not. And the first sentence of this answer do address that: there is no such thing as a Windows container on a Linux, which means you only have Linux containers and... a Linux container would not run anything Windows in it.
just trying to a devil's advocate here. The first sentence just says that a Linux container e.g. docker run -it <some-image> /bin/bash cannot be deployed on a Windows host (which have the docker engine installed). You didn't educate us that the vice-versa is also true.
I don't get, why isn't possibile to run a linux container inside windows docker engine? They are doing it right with Windows 10 and Hyper-V (I see a MobyLinuxVM in Hyper-V Manager) but not with Windows Server 2016, anyone known why?
@Jamby Because Windows Server 2016 implements Docker for Windows, for running Windows images. It does not have by default a VM to run a Linux machine on which you could have docker to run Linux container.
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.