-
-
Notifications
You must be signed in to change notification settings - Fork 1
wip build
Builds the image described by the build interaction in wip.yml, applying .dockerignore first.
wip build [--no-cache] [-- OPTIONS...]
wip build reads the interaction named build:
interaction:
build:
type: build # implied for an entry named `build`
context: . # relative to wip.yml's directory
tag: slidict/slidict:development # falls back to the inherited `image`
shadow_context: /mnt/c/Users/me/AppData/Local/wip/build-contexts # optionalResulting invocation:
wslc build -t <tag> [extra options…] .
The tag falls back to the primary container's image when unset. An empty one fails:
Build image/tag must not be empty
$ wip build
wip: staging build context (/home/me/my-project)
wip: copying build context files: 1240/1240
wip: [debug] running: wslc.exe build -t myapp:dev .- Resolve
contextagainstwip.yml's directory. - Read
.dockerignorefrom the context root and stage only the included files — see Dockerignore. - If
shadow_context:applies, sync a persistent Windows-side copy instead — see Shadow Build Context. -
chdirinto the staged directory and runwslc build … .
Step 4 uses . rather than an absolute path because wslc build crashes
(ERROR_UNHANDLED_EXCEPTION) when handed an absolute context.
wip build --no-cachewslc build reuses matching local layers by default (like docker build without --pull).
--no-cache disables that. Note wslc build has no --cache-from flag — passing one is a hard
error.
Anything after -- is passed straight through to wslc build:
wip build -- --build-arg RUBY_VERSION=3.4
wip build -- -f Dockerfile.dev
wip build --no-cache -- --build-arg TAG=ciThe -- separator itself is stripped. --no-cache is inserted only once even if you also pass it
after --.
wip build builds the build interaction, which is a wip.yml concept. Services in
compose.yml that declare build: are built by wip up, not by this command:
$ wip up -d
wip: building service 'app' (tag: myapp:dev) from /home/me/appSee Compose Build. wip up --no-cache applies --no-cache to those builds.
Under mode: compose, builds belong to your compose tool. A type: build
interaction is rejected:
commands.build: type 'build' is not supported in compose mode (use `wslc-compose build`/`up --build` directly)
| Symptom | Cause | Page |
|---|---|---|
| Staging copies far too many files | no/insufficient .dockerignore
|
Dockerignore |
| Every build re-transfers the whole tree | context is WSL-side, no shadow configured | Shadow Build Context |
pull access denied |
registry auth | Registry Authentication |
no matching manifest for linux/… |
image arch mismatch | Architecture Mismatch |
Build fails fetching a git: dependency |
Git missing in the build environment (wip doctor warns) |
wip doctor |
-
Interactions — the
buildentry's keys - Dockerignore
- Shadow Build Context
- wip up
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