When building Docker images in GitHub Actions, which feature of 'docker/build-push-action' speeds up builds by caching Docker layers?
Select an answer to reveal the explanation.
Short Explanation and Infographic
docker/build-push-action's cache-from/cache-to hooks into BuildKit's cache backend — point it at your registry or the Actions cache for layer reuse.
Full explanation below image
Full Explanation
docker/build-push-action supports BuildKit cache integration via 'cache-from' and 'cache-to' parameters. Common patterns: 'cache-from: type=gha' and 'cache-to: type=gha,mode=max' uses GitHub Actions cache to store Docker layer cache; 'cache-from: type=registry,ref=ghcr.io/org/app:cache' and 'cache-to: type=registry,ref=ghcr.io/org/app:cache' uses the container registry. The 'mode=max' setting caches all layers (including intermediate), while 'mode=min' caches only the final image layers. 'fast-build: true' doesn't exist. DOCKER_BUILDKIT enables BuildKit but doesn't configure layer caching location. Docker layer caching is not automatic between runs.