{"record":{"id":"d0252b083e3e3bca","repo":"docker/cli","slug":"s-is-a-manifest-list","errorCode":null,"errorMessage":"%s is a manifest list","messagePattern":"(.+?) is a manifest list","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"internal/registryclient/fetcher.go","lineNumber":39,"sourceCode":"\t\"github.com/sirupsen/logrus\"\n)\n\n// fetchManifest pulls a manifest from a registry and returns it. An error\n// is returned if no manifest is found matching namedRef.\nfunc fetchManifest(ctx context.Context, repo distribution.Repository, ref reference.Named) (types.ImageManifest, error) {\n\tmanifest, err := getManifest(ctx, repo, ref)\n\tif err != nil {\n\t\treturn types.ImageManifest{}, err\n\t}\n\n\tswitch v := manifest.(type) {\n\t// Removed Schema 1 support\n\tcase *schema2.DeserializedManifest:\n\t\treturn pullManifestSchemaV2(ctx, ref, repo, *v)\n\tcase *ocischema.DeserializedManifest:\n\t\treturn pullManifestOCISchema(ctx, ref, repo, *v)\n\tcase *manifestlist.DeserializedManifestList:\n\t\treturn types.ImageManifest{}, fmt.Errorf(\"%s is a manifest list\", ref)\n\t}\n\treturn types.ImageManifest{}, fmt.Errorf(\"%s is not a manifest\", ref)\n}\n\nfunc fetchList(ctx context.Context, repo distribution.Repository, ref reference.Named) ([]types.ImageManifest, error) {\n\tmanifest, err := getManifest(ctx, repo, ref)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tswitch v := manifest.(type) {\n\tcase *manifestlist.DeserializedManifestList:\n\t\treturn pullManifestList(ctx, ref, repo, *v)\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unsupported manifest format: %v\", v)\n\t}\n}\n","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/docker/cli/blob/4f84911bfe8811e9b028e4b1fee8e7510be79387/internal/registryclient/fetcher.go#L21-L57","documentation":"fetchManifest (used by GetManifest, the single-manifest API) errors when the referenced image resolves to a manifest list / OCI index rather than a single-platform manifest. The data is fine; you asked for one manifest but the image is multi-arch. Use GetManifestList to enumerate the platform-specific entries.","triggerScenarios":"Calling GetManifest on a multi-arch image such as \"nginx:latest\" whose top-level object is a manifest list; the type switch in fetchManifest hits the manifestlist branch.","commonSituations":"Not realizing a popular image ships as a manifest list; calling the single-manifest endpoint by default; tooling that assumes every image is a single manifest.","solutions":["Call GetManifestList instead to fetch all platform-specific manifests.","Or resolve a specific platform digest first (e.g. via docker manifest inspect) and call GetManifest on that digest.","Inspect the image with `docker manifest inspect <ref>` to confirm it is a list.","If your pipeline only supports single manifests, build a platform-specific tag instead of a multi-arch one."],"exampleFix":"// before\nm, err := c.GetManifest(ctx, ref) // -> is a manifest list\n\n// after\nlist, err := c.GetManifestList(ctx, ref)","handlingStrategy":"fallback","validationCode":"// When unsure whether an image is a list, prefer the list API.\nfunc fetchAny(ctx context.Context, c RegistryClient, ref reference.Named) ([]types.ImageManifest, error) {\n    if list, err := c.GetManifestList(ctx, ref); err == nil {\n        return list, nil\n    }\n    m, err := c.GetManifest(ctx, ref)\n    if err != nil {\n        return nil, err\n    }\n    return []types.ImageManifest{m}, nil\n}","typeGuard":null,"tryCatchPattern":"// Catch the manifest-list case and fall back to the list API.\nvar le listErr // your sentinel wrapping the message\nif errors.As(err, &le) {\n    return c.GetManifestList(ctx, ref)\n}","preventionTips":["Default to GetManifestList for public images that are commonly multi-arch.","Use `docker manifest inspect` to learn an image's type before scripting.","Branch on media type when you have it rather than guessing."],"tags":["docker","registry","manifest","multi-arch"],"backgroundTag":null,"analyzedSha":"4f84911bfe8811e9b028e4b1fee8e7510be79387","analyzedAt":"2026-08-07T12:15:29.814Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}