Sub topic 13
Attestation entries in an index
This chapter assumes you can build and push a multi-platform image with docker buildx build --push, and that you know an image index lists per-platform manifests by digest. It covers the extra entries that Buildx can add to that list.
What an attestation entry is
An attestation is a signed-style statement about how an image was built or what it contains. BuildKit stores two kinds:
- Provenance records the build: source repository, Dockerfile, build arguments, and builder.
- SBOM (software bill of materials) lists the packages inside the image.
BuildKit does not attach these to the tag as separate objects. It writes each one as an extra manifest in the same index, so the attestations are pushed and pulled together with the images they describe.
How they appear in the index
Each attestation manifest has a platform of unknown/unknown, so no client treats it as a runnable image. Two annotations link it to its image:
vnd.docker.reference.typeisattestation-manifest.vnd.docker.reference.digestis the digest of the image manifest it describes.
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:<attestation-manifest-digest>",
"size": 566,
"annotations": {
"vnd.docker.reference.digest": "sha256:<amd64-manifest-digest>",
"vnd.docker.reference.type": "attestation-manifest"
},
"platform": { "architecture": "unknown", "os": "unknown" }
}A two-platform build with attestations therefore has four entries: two images and two attestation manifests.
Controlling attestations
Recent Buildx versions add a minimal provenance attestation by default when you push with a builder that supports it. SBOMs are opt-in. Set them explicitly so the result does not depend on your Buildx version:
docker buildx build \
--platform linux/amd64,linux/arm64 \
--provenance=mode=max \
--sbom=true \
-t registry.example.com/team/app:1.0 \
--push .Use mode=max only when you accept the extra detail it records, such as build arguments. To produce a plain index with only the images, pass --provenance=false --sbom=false.
Seeing them
Run the inspect command from the previous chapter:
docker buildx imagetools inspect registry.example.com/team/app:1.0The manifest list now includes entries with Platform: unknown/unknown and an vnd.docker.reference.type: attestation-manifest annotation. This is expected. Count only the entries with a real platform when you verify that amd64 and arm64 are both present.
Common problems
- Tools that reject unknown platforms. Some registries, scanners, and runtimes (AWS Lambda is a known case) fail on an index that contains
unknown/unknownentries. Rebuild with--provenance=false --sbom=falsefor those targets. - Digest changes. Provenance can include build-specific data, so rebuilding identical source can produce a different index digest even when the image layers match. Pin deployments to the image manifest digest if you need stability.
- Assembly drops them.
imagetools createcombines the sources you name. If you build each architecture separately, each source index carries its own attestation. Check the result, because the combined index may not hold what you expect. - Local loading. A multi-platform result with attestations cannot be loaded into a classic local image store. Push it to a registry instead.
Exercise
You build for linux/amd64 and linux/arm64 with --sbom=true and provenance enabled, then push. How many entries does the index contain, and how do you tell the attestation entries from the images?
Show answer
Four entries: two images and two attestation manifests, one for each platform. The attestation entries have platform unknown/unknown and the annotation vnd.docker.reference.type set to attestation-manifest. Their vnd.docker.reference.digest annotation holds the digest of the image manifest they describe.