Compose domainname on wslc
Compose's domainname is supported by wslc 2.9.4.0: it maps onto --domainname on the wslc run command line. Because wslc has no Compose runtime, nothing reads your YAML for you -- the value has to be lifted out of the service definition and passed as a flag. The translation below is what our converter emits.
| Compose key | domainname |
|---|---|
| Status on wslc 2.9.4.0 | Supported |
| wslc mapping | --domainname |
| Verified against | wslc 2.9.4.0, windows-2025 runner |
The Compose input
A minimal service that uses domainname. Everything below is derived from this
snippet, so you can match it against the shape of your own file.
services:
api:
image: node:22-alpine
domainname: internal.test The wslc translation
wslc has no Compose runtime, so there is no file to hand it. The service becomes a
wslc run invocation and domainname becomes
--domainname:
wslc run --name proj-api --domainname internal.test node:22-alpine Container and network names are prefixed with a project name the way Compose would do it, because wslc keeps no notion of a project. Pick a prefix and apply it consistently or the second stack you start will collide with the first.
How we know
The mapping was confirmed by executing it against wslc 2.9.4.0 on a Windows Server 2025 runner, not inferred from --help output alone. That distinction matters on a preview runtime: several flags are accepted by the parser but behave differently from their Docker namesakes, and only running them surfaces the difference.
Claims on this site are re-checked by a scheduled workflow that runs the commands
again on a fresh Windows Server 2025 runner and fails when a documented behaviour
stops matching reality. wslc ships roughly every two weeks during the preview, so
treat any page that disagrees with your own machine as the page being stale, and
check the version you are on with wslc version.
Where this key sits in the wider picture
Of the 39 Compose keys we audited against wslc 2.9.4.0, 23 translate directly, 2 translate with a caveat, and 14 have no equivalent at all. That ratio is the honest answer to whether a Compose stack can move to wslc today: simple single-service definitions usually port cleanly, while anything relying on orchestration, capabilities or restart behaviour does not.
Microsoft is tracking native Compose support in issue 40948, opened by a WSL program manager. At the time of writing it carried no milestone, no assignee and no implementation pull request, and the strongest community proposal is to expose a Docker Engine API-compatible endpoint and bundle upstream Compose rather than reimplement it. Either route would change this page from a migration guide into a behaviour-difference reference, which is why the URL will not move.
Full mapping table: Docker Compose to wslc migration guide. Command-level equivalents: Docker to wslc cheat sheet. Paste a whole file into the Compose migration analyser to see every key in it classified at once.