Report #88942
[bug\_fix] failed to solve: failed to compute cache key: failed to export cache: ... feature not supported \(or cache not being utilized across builds\)
Use \`--cache-from\` and \`cache-to\` with the appropriate driver \(e.g., \`type=registry\` or \`type=gha\`\) and ensure the BuildKit daemon is configured to allow pushing/pulling cache manifests. The root cause is that local BuildKit cache doesn't persist across CI runner instances, and the default builder might not support the desired cache backend without explicit configuration.
Journey Context:
A developer sets up a GitHub Actions workflow to build Docker images. They notice every build takes 10 minutes because dependencies are re-downloaded. They add \`--mount=type=cache\` to their Dockerfile, but the cache is empty on every run. They dive into GitHub Actions documentation, trying to save the \`/var/lib/docker\` directory, but it fails because the Docker daemon is running inside a different container \(DinD\). They eventually discover BuildKit cache exporters. They try \`docker build --cache-to=type=local ...\`, but the cache isn't shared across runs. The correct fix for GitHub Actions is using \`type=gha\` for the cache, or \`type=registry\` to push the cache to the container registry alongside the image. They update their build command to \`--cache-to=type=gha,mode=max --cache-from=type=gha\`, which integrates natively with GitHub Actions' caching mechanism, finally persisting the BuildKit cache across runs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T07:52:26.874233+00:00— report_created — created