{"record":{"id":"eda4ece98639da49","repo":"docker/cli","slug":"manifest-entry-for-image-has-unsupported-os-arch-c","errorCode":null,"errorMessage":"manifest entry for image has unsupported os/arch combination: %s/%s","messagePattern":"manifest entry for image has unsupported os/arch combination: (.+?)/(.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/command/manifest/annotate.go","lineNumber":165,"sourceCode":"\t}\n\tif opts.os != \"\" {\n\t\timageManifest.Descriptor.Platform.OS = opts.os\n\t}\n\tif opts.arch != \"\" {\n\t\timageManifest.Descriptor.Platform.Architecture = opts.arch\n\t}\n\tfor _, osFeature := range opts.osFeatures {\n\t\timageManifest.Descriptor.Platform.OSFeatures = appendIfUnique(imageManifest.Descriptor.Platform.OSFeatures, osFeature)\n\t}\n\tif opts.variant != \"\" {\n\t\timageManifest.Descriptor.Platform.Variant = opts.variant\n\t}\n\tif opts.osVersion != \"\" {\n\t\timageManifest.Descriptor.Platform.OSVersion = opts.osVersion\n\t}\n\n\tif !isValidOSArch(imageManifest.Descriptor.Platform.OS, imageManifest.Descriptor.Platform.Architecture) {\n\t\treturn fmt.Errorf(\"manifest entry for image has unsupported os/arch combination: %s/%s\", opts.os, opts.arch)\n\t}\n\treturn manifestStore.Save(targetRef, imgRef, imageManifest)\n}\n\nfunc appendIfUnique(list []string, str string) []string {\n\tif slices.Contains(list, str) {\n\t\treturn list\n\t}\n\treturn append(list, str)\n}\n","sourceCodeStart":147,"sourceCodeEnd":176,"githubUrl":"https://github.com/docker/cli/blob/4f84911bfe8811e9b028e4b1fee8e7510be79387/cli/command/manifest/annotate.go#L147-L176","documentation":"Returned by `runManifestAnnotate` (annotate.go:164-166) when `isValidOSArch(os, arch)` returns false after applying the --os/--arch flags. The function checks the os/arch pair against a fixed allowlist (util.go `validOSArches`). Note the error prints `opts.os`/`opts.arch` (the raw flag values), so if flags were empty the message may show empty strings even though the stored Platform was used for validation — a known quirk.","triggerScenarios":"Running `docker manifest annotate list img --os freebsd --arch mips` where `freebsd/mips` is not in the supported set, or `--os linux --arch mips` (mips not listed). Supported pairs include linux/amd64, linux/arm64, windows/amd64, etc.","commonSituations":"Targeting an OS/arch the CLI's allowlist doesn't recognize (older CLI versions, niche platforms like loong64/riscv64 not yet added), or typos in arch names (amd644).","solutions":["Use an OS/arch combination present in the validOSArches table (e.g. linux/amd64, linux/arm64, linux/arm, windows/amd64).","Upgrade the Docker CLI — newer versions extend the allowlist with more platforms.","Double-check spelling of the arch value (amd64 not amd644, arm64 not arm64v8).","If you genuinely need an unsupported pair, build a custom CLI or open an issue to extend the table."],"exampleFix":"# before\ndocker manifest annotate mylist img --os linux --arch mips64\n# after (verify support; mips64le may be supported in newer CLI)\ndocker manifest annotate mylist img --os linux --arch arm64","handlingStrategy":"validation","validationCode":"// validate os/arch against the CLI's known set before annotating\nif !isValidOSArch(osVal, archVal) {\n    return fmt.Errorf(\"unsupported os/arch %s/%s; pick a supported pair (e.g. linux/amd64)\", osVal, archVal)\n}","typeGuard":"func supportedOSArch() map[[2]string]bool {\n    // mirror util.go validOSArches; return the supported set for UI checks\n    return map[[2]string]bool{{\"linux\",\"amd64\"}:true, {\"linux\",\"arm64\"}:true, {\"windows\",\"amd64\"}:true /* ... */}\n}","tryCatchPattern":"if err := runManifestAnnotate(cli, opts); err != nil {\n    if strings.Contains(err.Error(), \"unsupported os/arch combination\") {\n        return fmt.Errorf(\"%w — see supported platforms in the manifest docs\", err)\n    }\n    return err\n}","preventionTips":["Pick os/arch from the documented supported set.","Upgrade the CLI to get newer platforms.","Double-check arch spelling (amd64, arm64, arm)."],"tags":["manifest","annotate","os-arch","platform","validation","docker-cli"],"backgroundTag":null,"analyzedSha":"4f84911bfe8811e9b028e4b1fee8e7510be79387","analyzedAt":"2026-08-07T12:15:29.814Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}