Sub topic 11
Inspecting an Index and Verifying Platforms
This chapter assumes you can build and push images, you know what a registry tag is, and you have read the earlier chapters on image manifests, digests and image indexes. Here you will inspect a pushed tag, read the output, and confirm that both amd64 and arm64 are present.
Why verify after a push
A successful docker buildx build --push does not prove the registry holds every platform you asked for. A tag can end up as a single-platform image if you forgot --platform, if a CI step overwrote the tag, or if a later push replaced it. Checking the pushed tag takes a few seconds and catches these mistakes before users do.
Inspecting with imagetools
The docker buildx imagetools inspect command reads the tag directly from the registry. It does not need the image to be pulled or stored locally.
docker buildx imagetools inspect registry.example.com/team/app:1.0The output has two parts. The header describes the index itself. Then each manifest is listed with its platform.
Name: registry.example.com/team/app:1.0
MediaType: application/vnd.oci.image.index.v1+json
Digest: sha256:<index-digest>
Manifests:
Name: registry.example.com/team/app:1.0@sha256:<amd64-manifest-digest>
MediaType: application/vnd.oci.image.manifest.v1+json
Platform: linux/amd64
Name: registry.example.com/team/app:1.0@sha256:<arm64-manifest-digest>
MediaType: application/vnd.oci.image.manifest.v1+json
Platform: linux/arm64Check these points:
- The top-level
MediaTypeis an index (application/vnd.oci.image.index.v1+json) or a Docker manifest list. If it is a plain manifest, the tag points to one platform only. - Each platform you expect has its own entry under
Manifests. - Each entry has a different digest. The index digest is not the digest of any single platform.
Reading the raw index
To see the JSON from the earlier chapter on the index format, ask for raw output.
docker buildx imagetools inspect --raw registry.example.com/team/app:1.0The manifests array holds one object per platform, each with a digest, a size, and a platform object with os, architecture and sometimes variant. For arm64 images the variant is often v8.
Verifying that the right image runs
The index tells you what is published. Running the image tells you what a client receives. Force each platform and print the machine architecture:
docker run --rm --platform linux/arm64 registry.example.com/team/app:1.0 uname -m
docker run --rm --platform linux/amd64 registry.example.com/team/app:1.0 uname -mThe first command should print aarch64 and the second x86_64. This only works if the image contains uname, so for a minimal image use the application's own version command instead. If the host cannot run the other architecture natively, Docker uses QEMU emulation when it is installed. The check still proves that the correct manifest was selected.
Following the flow
Common mistakes
| Symptom | Likely cause | Fix |
|---|---|---|
| Output shows no `Manifests` list | Tag points to a single manifest | Rebuild with `--platform` and `--push` |
| Only one platform listed | Another job overwrote the tag | Use unique tags per job, then assemble |
| Extra entries with `unknown/unknown` | Attestation manifests | Expected, covered in a later chapter |
| `exec format error` at run time | Wrong platform or no emulation | Check `--platform` and the binfmt setup |
Exercise
You push registry.example.com/team/app:2.0 and docker buildx imagetools inspect shows a top-level media type of application/vnd.oci.image.manifest.v1+json and no Manifests section. What does this mean, and what do you do?
Show answer
The tag points to a single-platform image manifest, not an index. Rebuild with --platform linux/amd64,linux/arm64 --push, or assemble an index from per-architecture images with docker buildx imagetools create. Then inspect again to confirm both platforms are listed.