Use a remote registry cache for faster CI builds.
Section: Buildx Build Workflows
Use registry cache
bash
bash
docker buildx build --cache-from type=registry,ref=ghcr.io/acme/myapp:cache --cache-to type=registry,ref=ghcr.io/acme/myapp:cache,mode=max --push -t ghcr.io/acme/myapp:1.0.0 .Explanation
Very effective for repeat builds across runners.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Buildx Build Workflows
Build and load into local daemon
Build and load the result into the local Docker image store.
Pass build secret
Pass a secret into the build without baking it into layers.