Compose key support on wslc
wslc 2.9.4.0 has no Compose runtime. Migrating a stack means translating each service into a
wslc run command, and whether that is possible comes down to which Compose
keys your file uses. We executed all 39 keys against wslc 2.9.4.0 on a
Windows Server 2025 runner. Each one has its own page with the YAML, the resulting
command, and what we measured.
| Outcome | Keys | What it means |
|---|---|---|
| 23 | Translate directly | A wslc run flag carries the same meaning. |
| 2 | Translate with a caveat | A flag exists but not every Compose form survives. |
| 14 | No equivalent | No flag exists; the workload must be restructured. |
Translates directly (23)
| Key | wslc mapping |
|---|---|
build | wslc build -t <name> |
command | trailing command args |
container_name | --name |
dns | --dns |
domainname | --domainname |
entrypoint | --entrypoint |
env_file | --env-file |
environment | -e KEY=VALUE |
healthcheck | --health-cmd / --health-interval / --health-retries / --health-timeout / --health-start-period |
hostname | --hostname |
image | positional image argument |
labels | --label |
mem_limit | -m |
ports | -p HOST:CONTAINER |
shm_size | --shm-size |
stdin_open | -i |
stop_grace_period | --stop-timeout |
stop_signal | --stop-signal |
tmpfs | --tmpfs |
tty | -t |
ulimits | --ulimit |
user | -u |
working_dir | -w |
Translates with a caveat (2)
Has no wslc equivalent (14)
| Key | wslc mapping |
|---|---|
cap_add | none |
cap_drop | none |
configs | none |
depends_on | none |
deploy | none |
devices | none |
expose | none |
extends | none |
network_mode | none |
privileged | none |
profiles | none |
restart | none |
secrets | none |
security_opt | none |
Reading the ratio honestly
23 of 39 keys translating sounds like most of a file will port, and for flat single-service definitions it does. The 14 that do not map are the ones that carry orchestration meaning: startup ordering, restart behaviour, Linux capabilities, Swarm sections, and generic device passthrough. A stack whose correctness depends on those is not a translation problem, it is a redesign.
Microsoft tracks native Compose support in issue 40948. The most supported community proposal is to expose a Docker Engine API-compatible endpoint and bundle upstream Compose unchanged rather than reimplement it, which would make Compose files work as-is. If that lands, these pages switch from migration steps to documenting behaviour differences under the same URLs.
To classify a whole file at once, paste it into the Compose migration analyser. For command-level equivalents see the Docker to wslc cheat sheet, and for the narrative walkthrough see the Compose migration guide.