Skip to content

refactor(build): unify image build graph for cache reuse#390

Open
drew wants to merge 1 commit intomainfrom
simplify-image-build-cache-an
Open

refactor(build): unify image build graph for cache reuse#390
drew wants to merge 1 commit intomainfrom
simplify-image-build-cache-an

Conversation

@drew
Copy link
Collaborator

@drew drew commented Mar 17, 2026

Summary

Simplify the two-image container build pipeline around one shared Docker build graph so gateway and cluster builds reuse the same Rust dependency cache instead of recompiling overlapping workspace state separately.

Related Issue

N/A

Changes

  • replace the split gateway and cluster Dockerfiles with a shared deploy/docker/Dockerfile.images build graph
  • add a shared docker-build-image.sh helper and route local, publish, and fast-deploy flows through it
  • make supervisor fast deploy build from the shared supervisor-builder target so it reuses the same cache path as full image builds
  • update architecture docs and the cluster debug skill to reflect the new shared image build layout

Testing

  • mise run pre-commit passes
  • Unit tests added/updated
  • E2E tests added/updated (if applicable)

Additional validation:

  • bash -n tasks/scripts/docker-build-image.sh tasks/scripts/docker-build-component.sh tasks/scripts/docker-build-cluster.sh tasks/scripts/docker-publish-multiarch.sh tasks/scripts/cluster-deploy-fast.sh tasks/scripts/cluster-bootstrap.sh tasks/scripts/cluster-push-component.sh
  • RUSTC_WRAPPER= cargo check --workspace
  • docker buildx build --check -f deploy/docker/Dockerfile.images --target gateway .
  • docker buildx build --check -f deploy/docker/Dockerfile.images --target cluster .
  • docker buildx build --check -f deploy/docker/Dockerfile.images --target supervisor-builder .
  • mise run pre-commit (fails on existing workspace lint warnings outside this change)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

Signed-off-by: Drew Newberry <anewberry@nvidia.com>
@drew drew self-assigned this Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant