Command Line Tools
wheels deploy build push
Build the image locally and push it to the configured registry. Runs on the control machine; no SSH, no remote hosts.
Synopsis
Section titled “Synopsis”wheels deploy build push [--version=<v>] [--destination=<name>] [--dry-run]| Flag | Description |
|---|---|
--version=<v> | Tag for the pushed image. Defaults to git short sha. |
--destination=<name> | Overlay destination config. |
--dry-run | Print the docker buildx build --push command without executing. |
Behavior
Section titled “Behavior”Emits one command:
docker buildx build --push --platform linux/<arch>[,linux/<arch>...] [--builder kamal-<service>] --label service=<service> [--build-arg KEY=value ...] --tag <image>:<version> --file <dockerfile> <context>--fileand the context come frombuilder.dockerfile(defaultDockerfile) andbuilder.context(default.). The image is prefixed withregistry.serverunless the server isdocker.io.--platformlists onelinux/<arch>per entry inbuilder.arch, which takes a list or a comma-separated string and defaults toamd64. An entry that already contains/(for examplelinux/arm/v7) is used as is. An entry that isn’t a plain platform name (letters, digits,.,_,/and-only) stops the command withWheels.Deploy.InvalidInput.--builder kamal-<service>is added whenbuilder.remoteis set. That builder is the onewheels deploy build createcreates on the remote host.--build-argis added once perbuilder.argsentry, sorted by key.--label service=<service>is always set.wheels deploy prune imagesrelies on it to find the service’s images; images built before this label was added carry none.
With --dry-run, for a builder of arch: amd64,arm64, remote: ssh://deploy@192.0.2.50 and args: {ALPHA: first, ZETA: last}:
[local] docker buildx build --push --platform linux/amd64,linux/arm64 --builder kamal-ddapp --label 'service=ddapp' --build-arg 'ALPHA=first' --build-arg 'ZETA=last' --tag 'ddapp/web:v3' --file 'Dockerfile' '.'Example
Section titled “Example”wheels deploy build push