Interview Prep/Docker/Build failures and cache problems

`--cache-from type=gha` shows no cache hits in GitHub Actions.

AdvancedTroubleshootingBuild failures and cache problems
Answer

Likely causes → Cache scope differs per workflow/branch, cache evicted (10 GB repo limit), mode=max not set, or the Dockerfile changes early layers, or the cache backend isn't configured because the Actions runtime token isn't exposed to the step.

Diagnose → Look for importing cache manifest from gha in logs; check the Actions cache UI.

Fix → Use scope=, mode=max, use docker/build-push-action with docker/setup-buildx-action, or switch to registry cache.

Prevent → Keep a stable early-layer structure.

All Docker questions Roadmap: Docker & containers

More on Build failures and cache problems