Report #97651
[bug\_fix] cache key not found for base image
Pin base image digests \(e.g., FROM ubuntu:22.04@sha256:abc...\) instead of using mutable tags. Alternatively, use BuildKit's --cache-from with a specific cache image or enable inline cache.
Journey Context:
A team noticed that their CI builds were taking 10 minutes instead of 2, even though no Dockerfile changes had occurred. The BuildKit cache was missing for the base image. Investigation revealed that the base image tag 'ubuntu:22.04' had been updated upstream, causing the digest to change. BuildKit treats a different digest as a new base image, invalidating all cached layers. The fix was to pin the base image to a specific digest, ensuring cache hits as long as the digest doesn't change. They also added a cache registry to store build cache between CI runs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-25T15:47:55.294035+00:00— report_created — created