-
-
Notifications
You must be signed in to change notification settings - Fork 1
wip exec
Runs a command inside the already-running primary container.
wip exec [--no-interactive] COMMAND...
wip exec bundle install
wip exec bin/rails db:migrate
wip exec ls -la /appwslc exec [-it] [-w WORKDIR] [-u USER] [-e KEY=VALUE …] CONTAINER command…
Values come from the primary dependencies: entry (or compose.service's definition under
compose-native): workdir, user, env, plus everything from .env.
Ports and volumes are not applied. The container already exists with whatever it was created
with; exec attaches to it. If you added a port or a mount to wip.yml, you need
wip down && wip up -d, not exec.
Skips the -it flags, so nothing is attached to stdin:
wip exec --no-interactive bundle exec rspecUse it in scripts and CI, or when the command reads from a pipe. Note that even without this flag, wip only allocates a TTY when stdin and stdout are both real TTYs — so piped output already degrades gracefully. See TTY Allocation.
$ wip exec ls
Error: container "app" is not running(The exact message comes from wslc.) Start it first:
wip up -dIf you want a command that doesn't need a running container, use wip run instead.
wip exec |
wip run |
|
|---|---|---|
| Container | the existing one | a fresh --rm one |
Requires wip up first |
yes | no |
| Shares state with the running app | yes | no |
| Ports / volumes applied | no | yes |
| Startup cost | none | a container start |
Under mode: compose
|
bridged exec
|
falls back to exec
|
Reach for exec by default — it's faster and sees the same filesystem the app does.
Bridged to the external tool:
<compose command> -f FILE [-p PROJECT] exec [-T] <compose.service> command…
-T is added when non-interactive.
Typing wip exec bundle exec rspec every time is what interaction: exists to avoid:
interaction:
rspec:
command: bundle exec rspecwip rspec --fail-fastSee Interactions.
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