Sub topic 9
Verifying the pushed image
This chapter assumes you can build and push a multi-platform image with Buildx, as shown in the previous chapter. After a push, you should confirm that the registry holds what you intended. A tag can exist and still be missing a platform.
What to check
A multi-platform tag points to a manifest list (an OCI image index). Verification answers three questions:
- Does the tag resolve to a manifest list?
- Does the list contain every platform you requested?
- Does each platform's image actually run?
Inspect the manifest list
Use imagetools inspect to read the tag directly from the registry. It does not need a local copy of the image.
docker buildx imagetools inspect registry.example.com/team/app:1.0The output looks like this:
Name: registry.example.com/team/app:1.0
MediaType: application/vnd.oci.image.index.v1+json
Digest: sha256:1c2d...
Manifests:
Name: registry.example.com/team/app:1.0@sha256:aa11...
MediaType: application/vnd.oci.image.manifest.v1+json
Platform: linux/amd64
Name: registry.example.com/team/app:1.0@sha256:bb22...
MediaType: application/vnd.oci.image.manifest.v1+json
Platform: linux/arm64The top Digest identifies the list. Each entry under Manifests has its own digest and a Platform line. If a platform you requested is missing, the build did not produce it.
Digests are content hashes, so you can pin a deployment to one. Pinning to the list digest keeps all platforms. Pinning to one entry's digest locks you to a single architecture.
Check provenance entries
Recent Buildx versions add attestations (provenance and SBOM records) to pushed images by default. These appear in the list as extra entries with the platform unknown/unknown. They are not broken images. If a tool complains about an unknown platform, this is the usual cause.
Run each platform
A listing proves the metadata exists. Running the image proves it works. Pull a specific platform with --platform:
docker run --rm --platform linux/arm64 registry.example.com/team/app:1.0 uname -mOn an amd64 host this runs through QEMU, which requires the binfmt handlers from the earlier chapter. It prints aarch64 for arm64 and x86_64 for amd64. If the image's entrypoint is not a shell, override it first with --entrypoint uname, then pass -m as the argument.
docker run --rm --platform linux/arm64 --entrypoint uname registry.example.com/team/app:1.0 -mCommon findings
| Symptom | Likely cause |
|---|---|
| Only one platform listed | `--platform` was omitted or a node was missing |
| `exec format error` on run | The image is for a different architecture and no emulation is registered |
| `unknown/unknown` entries | Attestations, not an error |
| Tag shows a single manifest, not an index | The build used the default `docker` driver and loaded locally |
Exercise
You pushed app:1.0 for amd64 and arm64. imagetools inspect lists four manifests, two of them with platform unknown/unknown. Is the push broken, and how do you confirm each real platform works?
Show answer
The push is not broken. The unknown/unknown entries are attestations (provenance and SBOM). The other two entries are the amd64 and arm64 images. Confirm each by running docker run --rm --platform linux/amd64 --entrypoint uname registry.example.com/team/app:1.0 -m and the same with linux/arm64, then check that the output is x86_64 and aarch64.