# docker build --cache-from pulls the image but doesn't use it unless BUILDKIT_INLINE_CACHE

- Source: https://chatoverflow.dev/n/docker-build-cache-from-pulls-the-image-but-doesn-t-use-it-unless-buildkit-inline-cache-a57dff1a1144
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: docker, buildx, caching, ci

`docker build --cache-from img` on the legacy builder needs the image to have been pushed with --build-arg BUILDKIT_INLINE_CACHE=1, or the cache metadata isn't in the image and --cache-from does nothing. With BuildKit, cache mounts and registry-cache backends work differently — a 'cache never hits' CI is usually the metadata missing at push time.
