{"record":{"id":"98e4d65fff59e168","repo":"GoogleContainerTools/skaffold","slug":"getting-digest-w","errorCode":null,"errorMessage":"getting digest: %w","messagePattern":"getting digest: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/docker/image.go","lineNumber":412,"sourceCode":"\t\t\treturn\n\t\t}\n\t\timageID = result.ID\n\t}\n\n\tif err := streamDockerMessages(out, resp.Body, auxCallback); err != nil {\n\t\tvar jm *jsonstream.Error\n\t\tif errors.As(err, &jm) {\n\t\t\treturn \"\", fmt.Errorf(\"docker build failure: %w\", err)\n\t\t}\n\t\treturn \"\", fmt.Errorf(\"unable to stream build output: %w\", err)\n\t}\n\n\tif imageID == \"\" {\n\t\t// Maybe this version of Docker doesn't return the digest of the image\n\t\t// that has been built.\n\t\timageID, err = l.ImageID(ctx, opts.Tag)\n\t\tif err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"getting digest: %w\", err)\n\t\t}\n\t}\n\n\treturn imageID, nil\n}\n\n// streamDockerMessages streams formatted json output from the docker daemon\nfunc streamDockerMessages(dst io.Writer, src io.Reader, auxCallback func(jsonstream.Message)) error {\n\ttermFd, isTerm := term.IsTerminal(dst)\n\treturn progress.DisplayJSONMessagesStream(src, dst, termFd, isTerm, auxCallback)\n}\n\n// Push pushes an image reference to a registry. Returns the image digest.\nfunc (l *localDaemon) Push(ctx context.Context, out io.Writer, ref string) (string, error) {\n\tregistryAuth, err := l.encodedRegistryAuth(ctx, DefaultAuthHelper, ref)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"getting auth config for %q: %w\", ref, err)\n\t}","sourceCodeStart":394,"sourceCodeEnd":430,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/docker/image.go#L394-L430","documentation":"After the build, if no imageID (digest) was returned via aux messages — some older Docker versions omit it — Build looks the image up by tag with ImageID. If that lookup fails, the digest cannot be determined and the build is reported as failed with `getting digest`.","triggerScenarios":"The build succeeded but the daemon did not return an aux digest (older daemon API version), and the subsequent ImageID(ctx, opts.Tag) call fails — image not found under that tag, daemon query error, or auth failure.","commonSituations":"Old Docker daemon versions that don't stream digest aux messages; the tag was retagged/removed by a concurrent job between build and lookup; daemon API version mismatch.","solutions":["Upgrade the Docker daemon to a version that returns digests in build aux output","Confirm the image exists with `docker images` under the exact tag used","Re-run the build; a race with another retag/prune job may have removed the tag","Check daemon connectivity and API version negotiation"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"imageID, err := daemon.Build(...)\nif err != nil && strings.Contains(err.Error(), \"getting digest\") {\n\t// fall back to looking the image up manually by tag\n\timageID, lookupErr := daemon.ImageID(ctx, tag)\n\tif lookupErr != nil { return lookupErr }\n}","preventionTips":["Use a reasonably recent Docker daemon that streams digests via aux messages","Avoid concurrent retag/prune jobs targeting the same tags during builds"],"tags":["docker","digest","image-lookup"],"backgroundTag":"image-digest-not-found","analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}