Build or download stack containers
stack prepare [OPTIONS][Placeholder: Add detailed description of how prepare orchestrates the building and downloading of containers needed for a stack]
| Option | Type | Description | Default |
|---|---|---|---|
--stack |
TEXT | Name or path of the stack | - |
--include-containers |
TEXT | Only build/download these containers (multiple) | - |
--exclude-containers |
TEXT | Don't build/download these containers (multiple) | - |
--include-repos |
TEXT | Only clone these repositories (multiple) | - |
--exclude-repos |
TEXT | Don't clone these repositories (multiple) | - |
--git-ssh/--no-git-ssh |
FLAG | Use SSH for git rather than HTTPS | From config |
--git-pull |
FLAG | Pull the latest changes for an existing repo | False |
--build-policy |
CHOICE | Build policy to use | as-needed |
--extra-build-args |
TEXT | Supply extra arguments to build | - |
--dont-pull-images |
FLAG | Don't pull remote images | False |
--publish-images |
FLAG | Publish the built images | False |
--image-registry |
TEXT | Specify the remote image registry | From config |
--target-arch |
TEXT | Specify a target architecture (with --dont-pull-images) | - |
| Policy | Description | Use Case |
|---|---|---|
as-needed |
Build only if image doesn't exist or source changed | Default, efficient |
build |
Always build from source | Force rebuild |
build-force |
Force rebuild, ignore cache | Clean rebuild |
prebuilt |
Use prebuilt images only | Production |
prebuilt-local |
Use local prebuilt images | Offline work |
prebuilt-remote |
Pull from remote registry | CI/CD |
fetch-repos |
Only clone repositories, no building | Repository setup |
The prepare command:
- Clones required repositories (if needed)
- Builds container images from source (based on policy)
- Downloads prebuilt images (if specified)
- Tags images appropriately
- Optionally publishes to registry
# Prepare all containers for a stack
stack prepare --stack my-stack
# Prepare with latest code
stack prepare --stack my-stack --git-pull
# Prepare and publish
stack prepare --stack my-stack --publish-images --image-registry registry.example.com# Only prepare specific containers
stack prepare --stack my-stack --include-containers frontend --include-containers backend
# Exclude certain containers
stack prepare --stack my-stack --exclude-containers test-utils
# Only clone repositories
stack prepare --stack my-stack --build-policy fetch-repos# Force rebuild everything
stack prepare --stack my-stack --build-policy build-force
# Use only prebuilt images
stack prepare --stack my-stack --build-policy prebuilt
# Pull from remote registry
stack prepare --stack my-stack --build-policy prebuilt-remote# Prepare with custom build arguments
stack prepare --stack my-stack --extra-build-args "--build-arg VERSION=1.2.3"
# Prepare for specific architecture
stack prepare --stack my-stack --target-arch arm64 --dont-pull-images
# Prepare with SSH for private repos
stack prepare --stack my-stack --git-ssh --include-repos private-repo- stack build - Build stack components
- stack fetch - Clone repositories
- stack deploy - Deploy a stack