Was support for "mixed" mode (Windows + Linux containers) removed?

I searched for information about this but have so far been unable to find anything. My apologies if this has been answered elsewhere (and could you please point me there?).

I need to run a Windows container and Linux container side-by-side. I was able to achieve this using Docker Compose in Docker Desktop 4.18.0 by following the steps outlined here, but later versions of Docker Desktop appear to have dropped support for this either intentionally or unintentionally. Now, docker compose up complains about the Linux container with operating system is not supported and fails.

Could anyone provide some insight on this? Was a change announced and I’m just not seeing it? Is it coming back? As of right now, I’m forced to use Docker Desktop 4.18.0 until the functionality is restored.

Since you need a virtual machine for Linux containers (Docker Desktop runs one too), you can run one and run Linux containers in that while you are using Docker Desktop for Windows in Windows containers mode.

To be honest I have never heard about the feature of running Linux container in Windows containers mode just by setting the platform so I don’t know how that worked. There was a feature in the past like LCOW which was archived years ago. Now you can use WSL2 to run Docker containers in a Linux environment on Windows. You will not get the Desktop and you need some port forwards to connect to Linux containers from Windows containers, but the containers will run.

Thank you for your reply. It was most definitely supported, and Microsoft even blogged about it as “recently” as 2019. In fact, it looks like it only broke after Docker Desktop 4.18.0, which is why I’m investigating. It’s a very useful feature even if it is a little clunky (I suppose that’s why you’ve got to set experimental to true).

I realize I could set up a Windows VM and a Linux VM, give them each a K8s cluster, and connect them with something like Calico. At the moment, that’s overkill and I was hoping to keep it simple. Using an older version of Docker Desktop isn’t a dealbreaker, but it would have been nice to be able to use the most recent release (or an upcoming one, if there are plans to restore/fix the functionality).

Docker Desktop 4.18 was the last version with Docker Engine 20.10. Docker Desktop 4.19 started to use Docker Engine 23.0.5 but Docker Engine 23.0.0 removed the support of LCOW that I mentioned in my first reply. You can find the information in the release notes

Thank you again. I actually had just found that information and was going to post it here to confirm that it is what it looks like it is… and it is. That’s unfortunate, but oh well. Case closed!

Getting late to the conversation, but just wanted to point out that while this is not supported on Windows client (10 or 11) running Docker Desktop, you can (for development and testing purposes) run Windows and Linux containers side-by-side on Windows Server. I have a blog post on it here: Using WSL 2 on Windows Server 2022 to run Linux containers - Microsoft Community Hub

1 Like

Your comments are always welcome, even if it’s late :slight_smile: However, we discussed the possibility of running Linux containers in a VM

Would WSL2 make the communication between containers easier without port forwarding? Assuming of course that Windows containers are running on the host.

Ah, missed that. Mixed mode cluster on K8s works. In fact, you don’t even need multiple clusters - you can have a single cluster with Windows and Linux nodes. Both Calico and Flannel work.