Skip to content

ci: add Docker layer caching via BuildKit GHA cache backend - #245

Merged
elasticdotventures merged 1 commit into
mainfrom
feat/docker-layer-cache
Sep 7, 2026
Merged

ci: add Docker layer caching via BuildKit GHA cache backend#245
elasticdotventures merged 1 commit into
mainfrom
feat/docker-layer-cache

Conversation

@elasticdotventures

Copy link
Copy Markdown
Member

Replaces the plain docker build step with docker/build-push-action@v6 using the BuildKit GHA cache backend (cache-from: type=gha / cache-to: type=gha,mode=max).

This caches Docker build layers in GitHub Actions cache storage, so subsequent CI runs skip already-built layers. Combined with the cargo-chef setup in the Containerfile, dependency compilation layers should be cached across runs — cutting the ~14-18min Docker build down to near-zero on cache hits.

Changes:

  • Add docker/setup-buildx-action@v3 step
  • Replace docker build shell step with docker/build-push-action@v6 with GHA cache
  • load: true makes the image available locally for any downstream steps

Fixes #241

Replace plain docker build with docker/build-push-action using
cache-from/cache-to with type=gha. This caches Docker layers in
GitHub Actions cache storage, cutting rebuild times from ~14-18min
to near-zero on cache hits.

Fixes #241
@elasticdotventures
elasticdotventures merged commit 7a22d5d into main Sep 7, 2026
17 checks passed
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.

ci: Docker layer caching for build job (target <10min CI)

1 participant