GoogleContainerTools/skaffold · error
getting imageID for %q: %w
Error message
getting imageID for %q: %w
What it means
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.
Source
Thrown at pkg/skaffold/actions/docker/exec_env.go:203
return ts, tracked, nil
}
func (e ExecEnv) pullArtifact(ctx context.Context, out io.Writer, allbuilds map[string]graph.Artifact, useLocalImg bool, cfg latest.VerifyContainer) (*graph.Artifact, error) {
ba, foundInBuiltImgs := allbuilds[cfg.Image]
tag := cfg.Image
imgID := ""
var err error
if foundInBuiltImgs {
tag = ba.Tag
useLocalImg = true
}
if useLocalImg {
imgID, err = e.client.ImageID(ctx, tag)
if err != nil {
return nil, fmt.Errorf("getting imageID for %q: %w", tag, err)
}
}
notFoundLocally := imgID == ""
if notFoundLocally {
if err = e.client.Pull(ctx, out, tag, v1.Platform{}); err != nil {
return nil, err
}
}
return &graph.Artifact{
ImageName: cfg.Image,
Tag: tag,
}, nil
}
func (e ExecEnv) TrackContainerFromBuild(art graph.Artifact, cID string, cName string) {View on GitHub (pinned to a1189de023)
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).
Example fix
// before skaffold verify # fails: image pruned after build // after docker system df # avoid aggressive prune, or rebuild: skaffold build && skaffold verify
Defensive patterns
Strategy: retry
Validate before calling
// Confirm the tag exists locally before running actions docker image inspect <tag> > /dev/null || skaffold build
Try / catch
try {
await skaffold.verify(...);
} catch (e) {
if (/getting imageID for/.test(String(e))) {
execSync('skaffold build'); // image likely pruned; rebuild then retry
await skaffold.verify(...);
return;
}
throw e;
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- creating skaffold network %s: %w
- %q running container image %q errored during run with status
- docker deployment not supported alongside cluster deployment
- INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST
- executing build: %w
AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05).
Data as JSON: /api/errors/ee8303a59c69eb76.
Report an issue: GitHub.