

For example, Docker-Compose and Kubernetes cannot yet mix Windows and Linux containers. Furthermore, tooling support is not yet complete. This can cause some containers that rely heavily on volumes to fail to load. One known problem is volumes are not stable especially when mapping between Linux and Windows file systems. However, this is an experimental feature and may have some issues. Running Windows and Linux containers simultaneously on the same host is an interesting new feature in Docker with lots of possibilities. To determine the operating system an image requires you can use docker inspect and filter on the “Os” property. If you list your local image cache you’ll see a mixture of both Windows and Linux images. docker run -platform=linux -d ubuntu /bin/sh -c "while true do echo hello world sleep 1 done"ĭocker run -d microsoft/windowsservercore ping -t 127.0.0.1īoth containers are running on a single host. Now start the Linux container and a Windows Server Core container. The new –platform=linux command line switch is used to pull or start Linux images on Windows.

With Docker for Windows started and Windows containers selected, you can now run either Windows or Linux Containers simultaneously. Docker for Windows version 18.03.0-ce-win59 or greater In order to use the new LCOW feature, you will need the latest version Docker for Windows and have the Experimental Features enabled:ġ. LCOW will make it possible to have an application that mixes Linux and Windows containers together on a single host. Linux containers were hosted in a Linux Virtual Machine making it convenient for testing purposes but not production. For people like me who need a stable version of Docker for Windows, this feature was not available until now.ĭocker for Windows currently allows you to switch between running Windows or Linux Containers but not both. Previously, you could get LCOW only on the Edge or Nightly Build Channels. Starting with Docker for Windows version 18.03.0-ce-win59 the Linux Containers on Windows (LCOW) is available as an experimental feature. In the following post, Premier Developer Consultant Randy Patterson teaches us how to combat this limitation and run Docker Windows and Linux Containers simultaneously on the same host. Many of you with familiarity with Docker for Windows know how you currently have to switch between running either Windows or Linux Containers.
