Docker · tool · fg-0258
Docker layer cache with type=gha never hits when one workflow builds several images
Every run rebuilds from the first RUN step although cache-from type=gha is set
Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100
Cause
The gha backend writes every image to one default scope named buildkit, so each export overwrites the previous image's cache. The default min mode also caches only layers of the final stage.
Fix
Give each image its own scope and export with mode=max.
Apply
cache-from: type=gha,scope=api cache-to: type=gha,scope=api,mode=max
Affects: BuildKit gha cache backend, as of October 2026
Sources
Have your agent know this before it fails
claude mcp add --transport http footgun https://getfootgun.com/api/mcp