canasta image set-build-arg
canasta > image > set-build-arg
canasta image set-build-arg
Set build arguments of an instance built from source and rebuild it
Synopsis
Set one or more build arguments of an instance created with canasta create --build-from, replacing any value already recorded for the same key, then rebuild the instance's image with them and restart the instance onto it. The rebuild runs on the instance's host, from the source directory recorded at create; on Kubernetes the image is pushed to the in-cluster registry as on upgrade.
The image is rebuilt before the new arguments are recorded, so a failed build leaves both the recorded arguments and the running image as they were. A rebuild that yields the image the instance already runs does not restart it, and a stopped instance is left stopped. With --no-rebuild, the arguments are only recorded, and the next canasta upgrade rebuilds with them.
The usual reason to set one is BASE_IMAGE, the image an overlay's Dockerfile builds FROM. Build arguments are kept in the instance registry on the controller, not in gitops.
canasta image set-build-arg [flags] SETTINGS...
Examples
canasta image set-build-arg BASE_IMAGE=ghcr.io/canastawiki/canasta:3.5.29
canasta image set-build-arg -i mywiki MW_VERSION=master --no-rebuild
Arguments
| Argument | Description | Default | Required | Orchestrator |
|---|---|---|---|---|
SETTINGS |
KEY=VALUE build argument(s) to set | ✓ | Both |
Flags
| Flag | Shorthand | Description | Default | Required | Orchestrator |
|---|---|---|---|---|---|
--id |
-i |
Canasta instance ID | * | Both | |
--no-rebuild |
Record the build arguments without rebuilding the image | Both |
* Defaults to the Canasta instance matching the current directory, if any.
Global flags
| Flag | Shorthand | Description | Default | Required | Orchestrator |
|---|---|---|---|---|---|
--help |
-h |
Show help message and exit | Both | ||
--verbose |
-v |
Enable verbose output | Both |