-
-
Notifications
You must be signed in to change notification settings - Fork 1
wip run
Runs a command in a fresh, ephemeral container.
wip run [--no-interactive] COMMAND...
wip run bundle exec rails db:migrate
wip run bundle installwslc run [--rm] [-it] [-w WORKDIR] [-u USER] [-e KEY=VALUE …] [-p PORT …] [-v VOLUME …] IMAGE command…
Everything comes from the primary dependencies: entry (or compose.service's definition under
compose-native): image, workdir, user, env, ports, volumes, remove, plus .env.
Unlike wip exec, ports and volumes are applied, since this container is being
created. --rm is added when the entry's remove is true (the default).
This is the reason to use it. wip run works before wip up, or after wip down — useful for
setup steps that must happen before the app can boot:
wip run bundle install
wip run bin/rails db:create db:migrate
wip up -dSkips -it. See TTY Allocation.
- Nothing is shared with the running app beyond declared volumes. Files written outside a volume vanish with the container.
-
Ports may conflict. If the primary container is up and publishing
3000:3000, awip runthat also publishes it will fail. Either stop the app first or declare atype: runinteraction withports: []. -
With
sync:configured, the run container gets the rewritten mounts (read-only source + named volume), same aswip up— so it sees the mirrored tree, not your live host edits, unless you've synced recently.
The compose bridge's vocabulary is exec-only — there's no ephemeral-container equivalent — so
wip run execs into the already-running service instead, and says so:
$ wip run bundle install
wip: compose mode has no ephemeral 'run'; executing in the running 'app' service insteadWhich means under mode: compose, wip run does require the service to be up.
This is one of the concrete reasons to prefer mode: compose-native, where
wip run gets a real wslc run --rm.
Declare frequently-run one-offs instead of typing them:
interaction:
migrate:
type: run
command: bundle exec rails db:migrate
remove: truewip migratetype: run interactions are rejected under mode: compose. See Interactions.
- wip exec — the comparison table lives there
- Interactions
- Compose Mode
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