LLB adds image registry and OCI layout raw blob sources
Introduced 2026-03-04 · score 0.94
HOW TO USE IT
When an LLB definition needs one raw blob from a container image registry or OCI layout, use the matching blob source. It downloads the blob as a single file into an empty snapshot.
blob := llb.ImageBlob("<registry>/<repository>@sha256:<digest>", llb.Filename("<filename>"))blob := llb.OCILayoutBlob("<repository>@sha256:<digest>", llb.ImageBlobOCIStore("", "<store-id>"), llb.Filename("<filename>"))WHY THIS HELPS
Define an LLB source that reads a raw blob from an image registry or OCI layout.
REQUIREMENTS AND LIMITATIONS
- Version: v0.28.0
- reference (required): Blob reference in the form <registry>/<repository>@sha256:<digest> for a registry source, or <repository>@sha256:<digest> for an OCI layout source.
- llb.Filename("<filename>"): Sets the downloaded blob's filename.
- llb.ImageBlobOCIStore("", "<store-id>") (required): Selects the OCI layout content store by ID for the OCI layout source.
- Prerequisite: The source types were added in BuildKit v0.28.0.
- Prerequisite: For OCI layout sources, register the OCI content store in the LLB solve options using the same store ID.
FIRST-PARTY EVIDENCE
- https://github.com/moby/buildkit/releases/tag/v0.28.0
- https://github.com/moby/buildkit/pull/4286/files
Check the installed version and the source before using it. Entry JSON