Skip to content

Build (build.py)

build.py wraps docker buildx bake so you can regenerate Dockerfiles and build (or push) the generated targets from your workstation.

Usage

# Regenerate Dockerfiles, build all targets locally
python build.py all

# Build a single image + target stage and push to the registry
python build.py --push rolling --target base

Options

  • --no-generate: Skip the file generation step.
  • --push: Push results to ${DOCKER_REGISTRY:-althack} (or set DOCKER_PUSH=true).
  • --target <stage>: Limit to a single Dockerfile stage.
  • --no-clean: Skip the final docker system prune -f (or set DOCKER_CLEAN=false).

The script always reads from the generated docker-bake.hcl, updating tags like registry/repo:image-stage and registry/repo:image-stage-YYYY-MM-DD when pushing.