WSL icon indicating copy to clipboard operation
WSL copied to clipboard

Compose support in WSLc

Open craigloewen-msft opened this issue 5 months ago • 35 comments

Is your feature request related to a problem? Please describe. I want wslc to be able to run compose scenarios.

Describe the solution you'd like Some form of wslc compose should be supported.

Describe alternatives you've considered None.

Additional context N/A

craigloewen-msft avatar Jun 29 '26 23:06 craigloewen-msft

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise, please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The script will output the path of the log file once done.

If this is a networking issue, please use .\collect-wsl-logs.ps1 -LogProfile networking instead, following the instructions in Collect WSL logs for networking issues

Once completed please upload the output files to this GitHub issue.

See Collect WSL logs (recommended method).

If you choose to email these logs instead of attaching them to the bug, please send them to [email protected] with the GitHub issue number in the subject, and include a link to your GitHub issue comment in the message body, and reply with '/emailed-logs'.

github-actions[bot] avatar Jun 29 '26 23:06 github-actions[bot]

It’s interesting that a msft wsl pm is actually posting feature requests here. What’s even funnier is the bot's reply.

dolorain avatar Jun 30 '26 05:06 dolorain

Indeed - glad to see that this is taking such a quick notice. Really looking forward to this implementation!

Now I wonder if there will be any type of constraints with containers that require a specific filesystem model or anything of the sort (e.g. projects that involve PostgreSQL dbs are ones that come to mind)

tessharp avatar Jun 30 '26 08:06 tessharp

This is my number 1 use of containers. Either through Portainer, Docker, podman, what have you.. compose support is a must (and make sure it supports compose v3)

and wow there's already a PR https://github.com/clystian/WSL/pull/1

LanceMcCarthy avatar Jun 30 '26 17:06 LanceMcCarthy

@dolorain I work directly on the team! We know people would want this so we made an issue to track it :)

craigloewen-msft avatar Jul 01 '26 18:07 craigloewen-msft

I think the best approach would be for the WSLc Compose API to closely mirror the Docker Compose API 1:1, so it could act as a true drop-in replacement with full compatibility. This would make migration seamless for users, reduce the learning curve, and allow existing Compose files and tooling to work without any modifications, while still leaving room for WSLc-specific extensions where necessary.

MaciejGarncarski avatar Jul 02 '26 07:07 MaciejGarncarski

The Compose Spec is very well documented, and would be a real boon to have built into wslc.

https://github.com/compose-spec/compose-spec/blob/main/spec.md

jr-krandino avatar Jul 02 '26 14:07 jr-krandino

I frequently use docker-compose to orchestrate my app stacks. I would truly appreciate it if wslc adds support for compose in the future. It would be a game-changer for my development workflow!

changken avatar Jul 03 '26 11:07 changken

it would be absolutely amazing to have it !

advance467 avatar Jul 03 '26 12:07 advance467

Looking forward to seeing this feature updated soon.

sweetwisdom avatar Jul 06 '26 08:07 sweetwisdom

I was hoping for a docker-compose-like feature—glad to see someone else has already said this.

t0mmy4 avatar Jul 06 '26 12:07 t0mmy4

I can't wait for it to arrive at wslc

JavMB avatar Jul 07 '26 10:07 JavMB

Just want to add my support for this. Compose is really useful in devcontainer setups, especially when you need to spin up multiple dependent containers (databases, message brokers, etc.), so I’d love to see this land in wslc. Thanks for all the great work!

marineotter avatar Jul 07 '26 15:07 marineotter

Compose is really useful in devcontainer setups, especially when you need to spin up multiple dependent containers

Same here. Many of my dev-container setups require compose just for this.

kafumanto avatar Jul 08 '26 10:07 kafumanto

I've built a lot of "compose like" systems and I'll tell you the best solution is to just use real compose and just expose the docker socket API. I've watched podman go through this and the effort to create a system that looks like docker but isn't docker is just not worth it. You end up creating an island like podman. Now a Microsoft island would of course be big, but your kind of lying to yourself that's that's the best solution, because it's a windows only island.

ibuildthecloud avatar Jul 08 '26 14:07 ibuildthecloud

As I understand the official docker-compose binary uses the Docker API to work. If it is the case I recommend creating a http docker api compatible and then simply use the official docker-compose binary. Instead of implementing everything from scratch.

crramirez avatar Jul 13 '26 09:07 crramirez

While it might not be 100% compatible with docker compose, podman compose has been great for simple scenarios, so while not perfect its better than no compose compatibility at all.

AnderssonPeter avatar Jul 13 '26 20:07 AnderssonPeter

Fair points. I'd also be careful about a full reimplementation or a fork at this point.

For now, the most efficient path seems to be: make wslc expose a Docker API-compatible endpoint, and bundle upstream Compose as-is (Apache 2.0 allows it).

And I do think bundling matters. An out-of-the-box wslc compose is worth having, just backed by upstream rather than a rewrite.

A reimplementation can wait until bundling turns out to be impractical for some reason.

marineotter avatar Jul 13 '26 22:07 marineotter

I absolutely agree with the approach to catch-up the 100% functionality by bundling, rather than starting from scratch to repeat that 100%. Anything beyond could be revisited, contributed, forked, or replaced later.

raycheung avatar Jul 15 '26 06:07 raycheung

if i can help: https://github.com/bacarndiaye/wslc-compose

bacarndiaye avatar Jul 22 '26 14:07 bacarndiaye