-
-
Notifications
You must be signed in to change notification settings - Fork 1
Compose Mode
mode: compose makes wip a thin bridge to a third-party compose-for-wslc binary that you
install and name yourself. wip builds <command> -f FILE [-p PROJECT] up|down|stop|exec|logs
argument arrays; the external tool does the orchestration.
Prefer this when you already run such a tool, or when your compose.yml uses features outside
what compose-native supports. Otherwise see
Compose Native Mode.
version: 1
mode: compose # required; a compose: block without it is an error
compose:
service: app # required: which service wip run/exec/NAME target
command: wslc-compose # required: the compose-for-wslc binary or path you installed
file: compose.yml # optional; auto-detected next to wip.yml otherwise
project: myapp # optional; omitted lets the compose tool pick its default| Key | Required | Default | Notes |
|---|---|---|---|
compose.service |
yes | — | must not be empty |
compose.command |
yes | — | no default: wip doesn't favor any implementation |
compose.file |
no | auto-detected | relative paths resolve against wip.yml, not the cwd |
compose.project |
no | unset | passed as -p only when set |
Auto-detection looks for, in order: compose.yml, compose.yaml, docker-compose.yml,
docker-compose.yaml, next to wip.yml. None found is a ConfigError.
compose: is mutually exclusive with dependencies: and network:.
wslc has no native Compose support yet (tracked upstream in
microsoft/WSL#40948), and independent third-party
tools fill the gap. wip deliberately doesn't pick a winner — unlike wslc.command, which defaults
to auto and searches. Set compose.command to whichever binary name or absolute path you have.
Candidates: Third Party Compose Tools.
Whatever you point it at must understand -f FILE [-p PROJECT] up|down|stop|exec|logs — the
subset of the Compose CLI vocabulary wip drives.
| Command | Bridged to | Notes |
|---|---|---|
wip up |
<cmd> up [-d] |
--watch is rejected in this mode |
wip stop |
<cmd> stop |
|
wip down |
<cmd> down |
|
wip exec |
<cmd> exec [-T] <service> … |
-T when non-interactive |
wip run |
<cmd> exec … |
falls back to exec; wip warns |
wip shell |
<cmd> exec <service> bash, then sh
|
|
wip logs |
<cmd> logs [-f] [SERVICE…] |
multi-service, unlike compose-native |
wip NAME |
<cmd> exec <service> … |
only type: exec is supported |
-
No ephemeral
run. The exec-only vocabulary has no equivalent, sowip runexecs into the already-runningcompose.serviceand warns that it did. -
No
type: run/type: buildinteractions. Both raise aConfigErrorpointing you at your compose tool's ownbuild/up --build. Compose owns builds for its own services. -
No
wip up --watch. wip never parses a service list in this mode, so there's nothing to poll. Use whatever restart support your compose tool offers. -
sync:behaves differently.sync.modedefaults torunand cannot beexec, and one ofsync.image/sync.buildis required. See Sync Modes.
Compose owns the volume layout, so wip does not rewrite any mounts for you. Your compose
service must itself declare a named volume matching sync.volume (default <service>-src):
# compose.yml
services:
app:
volumes:
- app-src:/app
volumes:
app-src:wip's mirror writes into that volume from a separate, disposable container; it never touches the
compose service directly. wip up's pre-boot mirror (and --no-sync) work the same as elsewhere.
Full explanation: Sync Modes.
wip doctor in this mode additionally reports:
- whether
compose.commandresolves to an executable (and itsversionoutput) - which compose file wip resolved, and whether it exists
It does not parse the compose file here — that's the external tool's job. See wip doctor.
Introduction
Modes
Configuration
- Configuration Reference
- Config File Discovery
- Dependencies
- Networking
- Interactions
- Restart Policies
- Env Files
- Secret Masking
- Dockerignore
- Shadow Build Context
- Source Sync
- Sync Modes
compose.yml support
- Compose File Support
- Compose Build
- Compose Depends On
- Compose Profiles
- Compose Variable Interpolation
Commands
- CLI Command Reference
- wip init
- wip version
- wip doctor
- wip config
- wip build
- wip up
- wip stop
- wip down
- wip exec
- wip run
- wip shell
- wip logs
- wip sync
- wip dispatch
- Global Options
- Debug Output
- TTY Allocation
Guides
- Guides
- Migrating from dip
- Reusing an Existing compose.yml
- Fixing a Slow Boot
- Continuous Sync
- Auto Restarting Containers
- Multi Arch Images
- Using wip in CI
Troubleshooting
- Troubleshooting & FAQ
- FAQ
- Configuration Errors
- WSLC Not Found
- Registry Authentication
- Architecture Mismatch
- Volume Limit Reached
- rsync Not Found
- Reporting Issues
Comparison
Project