{"record":{"id":"65c476bfed39533d","repo":"docker/cli","slug":"digest-parse-of-image-q-failed-w","errorCode":null,"errorMessage":"digest parse of image %q failed: %w","messagePattern":"digest parse of image %q failed: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/command/manifest/push.go","lineNumber":164,"sourceCode":"\tif manifestRepoHostname != targetRepoHostname {\n\t\treturn manifestlist.ManifestDescriptor{}, fmt.Errorf(\"cannot use source images from a different registry than the target image: %s != %s\", manifestRepoHostname, targetRepoHostname)\n\t}\n\n\tmanifest := manifestlist.ManifestDescriptor{\n\t\tDescriptor: distribution.Descriptor{\n\t\t\tDigest:    imageManifest.Descriptor.Digest,\n\t\t\tSize:      imageManifest.Descriptor.Size,\n\t\t\tMediaType: imageManifest.Descriptor.MediaType,\n\t\t},\n\t}\n\n\tplatform := types.PlatformSpecFromOCI(imageManifest.Descriptor.Platform)\n\tif platform != nil {\n\t\tmanifest.Platform = *platform\n\t}\n\n\tif err := manifest.Descriptor.Digest.Validate(); err != nil {\n\t\treturn manifestlist.ManifestDescriptor{}, fmt.Errorf(\"digest parse of image %q failed: %w\", imageManifest.Ref, err)\n\t}\n\n\treturn manifest, nil\n}\n\nfunc buildBlobRequestList(imageManifest types.ImageManifest, repoName reference.Named) ([]manifestBlob, error) {\n\tblobs := imageManifest.Blobs()\n\tblobReqs := make([]manifestBlob, 0, len(blobs))\n\tfor _, blobDigest := range blobs {\n\t\tcanonical, err := reference.WithDigest(repoName, blobDigest)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tvar os string\n\t\tif imageManifest.Descriptor.Platform != nil {\n\t\t\tos = imageManifest.Descriptor.Platform.OS\n\t\t}\n\t\tblobReqs = append(blobReqs, manifestBlob{canonical: canonical, os: os})","sourceCodeStart":146,"sourceCodeEnd":182,"githubUrl":"https://github.com/docker/cli/blob/4f84911bfe8811e9b028e4b1fee8e7510be79387/cli/command/manifest/push.go#L146-L182","documentation":"Returned by `buildManifestDescriptor` (push.go:163-165) when `manifest.Descriptor.Digest.Validate()` fails for a constituent image. The digest must be a syntactically valid digest (e.g. `sha256:<64 hex>`); an empty, malformed, or unknown-algorithm digest triggers this. The %w wraps the digest validation error.","triggerScenarios":"A manifest entry whose stored digest is empty or corrupted, e.g. after a partial local-store write or a downgrade of the CLI storage format.","commonSituations":"Corrupted local manifest cache, a bug in an older CLI that stored an incomplete digest, or a manually-edited manifest store.","solutions":["Re-create the manifest list to repopulate descriptors: `docker manifest create --amend ...`.","Clear the local manifest store for the affected list and rebuild.","Upgrade the Docker CLI to a version that writes complete descriptors.","Inspect the member to confirm whether the source image has a valid digest on the registry."],"exampleFix":"# before\ndocker manifest push mylist   # a member has empty/invalid digest\n# after\nrm -rf ~/.local/share/docker/manifests/<encoded-list-name>\ndocker manifest create mylist img1 img2\ndocker manifest push mylist","handlingStrategy":"validation","validationCode":"for _, m := range manifests {\n    if err := m.Descriptor.Digest.Validate(); err != nil {\n        return fmt.Errorf(\"member %s digest invalid: %w; rebuild the local list\", m.Ref, err)\n    }\n}","typeGuard":"func validDigest(m types.ImageManifest) bool {\n    return m.Descriptor.Digest.Validate() == nil\n}","tryCatchPattern":"if err := runPush(ctx, cli, opts); err != nil {\n    if strings.Contains(err.Error(), \"digest parse of image\") {\n        // rebuild the list to repopulate descriptors\n        return recreateListAndPush(targetRef)\n    }\n    return err\n}","preventionTips":["Recreate the list if descriptors look stale.","Don't hand-edit the local manifest store.","Use a current CLI version that writes full digests."],"tags":["manifest","push","digest","validation","data-integrity","docker-cli"],"backgroundTag":null,"analyzedSha":"4f84911bfe8811e9b028e4b1fee8e7510be79387","analyzedAt":"2026-08-07T12:15:29.814Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}