Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux machine with docker deploy windows container

Tags:

docker

window

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?

like image 506
Claudio Pomo Avatar asked Oct 17 '15 19:10

Claudio Pomo


People also ask

Can I run Windows Docker container on Linux?

You can run both Linux and Windows programs and executables in Docker containers. The Docker platform runs natively on Linux (on x86-64, ARM and many other CPU architectures) and on Windows (x86-64). Docker Inc. builds products that let you build and run containers on Linux, Windows and macOS.

Can I run a Windows VM on Docker?

In general, Docker recommends running Docker Desktop natively on either Mac, Linux, or Windows. However, Docker Desktop for Windows can run inside a virtual desktop provided the virtual desktop is properly configured.

Can Docker desktop run Windows and Linux containers side by side?

Docker Desktop for Linux and Docker Engine can be installed side-by-side on the same machine. Docker Desktop for Linux stores containers and images in an isolated storage location within a VM and offers controls to restrict its resources.

Can I run Windows 10 in a Docker container?

For developers, Windows 10 is a great place to run Docker Windows containers and containerization support was added to the the Windows 10 kernel with the Anniversary Update (note that container images can only be based on Windows Server Core and Nanoserver, not Windows 10).


1 Answers

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.

like image 152
VonC Avatar answered Oct 20 '22 02:10

VonC