{"record":{"id":"ee8303a59c69eb76","repo":"GoogleContainerTools/skaffold","slug":"getting-imageid-for-q-w","errorCode":null,"errorMessage":"getting imageID for %q: %w","messagePattern":"getting imageID for %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/actions/docker/exec_env.go","lineNumber":203,"sourceCode":"\n\treturn ts, tracked, nil\n}\n\nfunc (e ExecEnv) pullArtifact(ctx context.Context, out io.Writer, allbuilds map[string]graph.Artifact, useLocalImg bool, cfg latest.VerifyContainer) (*graph.Artifact, error) {\n\tba, foundInBuiltImgs := allbuilds[cfg.Image]\n\ttag := cfg.Image\n\timgID := \"\"\n\tvar err error\n\n\tif foundInBuiltImgs {\n\t\ttag = ba.Tag\n\t\tuseLocalImg = true\n\t}\n\n\tif useLocalImg {\n\t\timgID, err = e.client.ImageID(ctx, tag)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"getting imageID for %q: %w\", tag, err)\n\t\t}\n\t}\n\n\tnotFoundLocally := imgID == \"\"\n\n\tif notFoundLocally {\n\t\tif err = e.client.Pull(ctx, out, tag, v1.Platform{}); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\treturn &graph.Artifact{\n\t\tImageName: cfg.Image,\n\t\tTag:       tag,\n\t}, nil\n}\n\nfunc (e ExecEnv) TrackContainerFromBuild(art graph.Artifact, cID string, cName string) {","sourceCodeStart":185,"sourceCodeEnd":221,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/actions/docker/exec_env.go#L185-L221","documentation":"pullArtifact decides whether to use a locally built image; when useLocalImg is true it queries the local Docker daemon for the image ID via client.ImageID. If that lookup fails, the task creation aborts with 'getting imageID for %q'. It wraps Docker daemon/API errors for the specific tag.","triggerScenarios":"createTasks -> pullArtifact with a locally-built artifact tag; docker ImageID (docker inspect) fails because the daemon is down, the image was pruned between build and run, or the tag reference is malformed.","commonSituations":"Docker daemon restarted / image pruned (docker system prune) after build; building in one context (remote DOCKER_HOST) and running actions in another; tag with wrong registry/repo casing.","solutions":["Check docker images for the exact tag; rebuild it (skaffold build) if it was pruned.","Verify docker info works and DOCKER_HOST/docker context match the daemon where the build ran.","Confirm the tag string in skaffold.yaml matches the built artifact tag exactly (no typo in registry or repo)."],"exampleFix":"// before\nskaffold verify  # fails: image pruned after build\n// after\ndocker system df  # avoid aggressive prune, or rebuild:\nskaffold build && skaffold verify","handlingStrategy":"retry","validationCode":"// Confirm the tag exists locally before running actions\ndocker image inspect <tag> > /dev/null || skaffold build","typeGuard":null,"tryCatchPattern":"try {\n  await skaffold.verify(...);\n} catch (e) {\n  if (/getting imageID for/.test(String(e))) {\n    execSync('skaffold build'); // image likely pruned; rebuild then retry\n    await skaffold.verify(...);\n    return;\n  }\n  throw e;\n}","preventionTips":["Avoid docker system prune between build and verify in pipelines","Use the same docker context for build and action execution","Rebuild when in doubt — skaffold build is cheap with cache enabled"],"tags":["docker","images","skaffold","custom-actions"],"backgroundTag":"docker-image-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"}