GoogleContainerTools/skaffold · error
StatusCode_BUILD_DOCKER_GET_DIGEST_ERR
StatusCode_BUILD_DOCKER_GET_DIGEST_ERR
Error message
getting imageID for %s: %s
What it means
localDigestGetErr builds a structured skaffold error (code StatusCode_BUILD_DOCKER_GET_DIGEST_ERR) wrapping the failure to resolve the imageID for a tag via the local Docker daemon. ImageID calls it when ImageInspectWithRaw / digest lookup on the local daemon returns an error, meaning skaffold could not determine the digest/ID of the built or referenced image.
Source
Thrown at pkg/skaffold/docker/errors.go:35
package docker
import (
"fmt"
sErrors "github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/errors"
"github.com/GoogleContainerTools/skaffold/v2/proto/v1"
)
func remoteDigestGetErr(err error) error {
return sErrors.NewError(err,
&proto.ActionableErr{
Message: err.Error(),
ErrCode: proto.StatusCode_BUILD_REGISTRY_GET_DIGEST_ERR,
})
}
func localDigestGetErr(tag string, err error) error {
err = fmt.Errorf("getting imageID for %s: %s", tag, err)
return sErrors.NewError(err,
&proto.ActionableErr{
Message: err.Error(),
ErrCode: proto.StatusCode_BUILD_DOCKER_GET_DIGEST_ERR,
})
}
View on GitHub (pinned to a1189de023)
Solutions
- Verify the image exists on the daemon skaffold is talking to: `docker images <tag>` under the same DOCKER_HOST/context.
- Check Docker is running and reachable (`docker info`); restart Docker Desktop/daemon if unresponsive.
- If using remote/remote-build setups, point DOCKER_HOST (or skaffold's docker config) at the daemon that holds the image.
- Re-run the build so the image is recreated, then retry the digest lookup.
Example fix
// before: image only exists on remote daemon $ skaffold dev # -> getting imageID for gcr.io/app:v1: no such image // after: target the daemon holding the image $ export DOCKER_HOST=ssh://buildhost $ skaffold dev
Defensive patterns
Strategy: retry
Validate before calling
// Go: confirm the tag resolves locally before relying on ImageID
ctx := context.Background()
cli, _ := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation())
if _, _, err := cli.ImageInspectWithRaw(ctx, tag); err != nil {
return fmt.Errorf("image %s not present on this daemon (check DOCKER_HOST): %w", tag, err)
} Try / catch
id, err := docker.ImageID(ctx, cfg, tag)
if err != nil {
var sErr *sErrors.Error
if errors.As(err, &sErr) && sErr.ErrCode == proto.StatusCode_BUILD_DOCKER_GET_DIGEST_ERR {
time.Sleep(2 * time.Second)
id, err = docker.ImageID(ctx, cfg, tag) // daemon may have been restarting
}
if err != nil {
return fmt.Errorf("verify image exists on DOCKER_HOST=%s: %w", os.Getenv("DOCKER_HOST"), err)
}
} Prevention
- Always build and inspect against the same DOCKER_HOST/context.
- Avoid `docker system prune` between build and digest lookup in CI pipelines.
- Add a readiness check (`docker info`) before build steps.
- Prefer digest-pinned tags for images built on other hosts.
When it happens
Trigger: Calling ImageID(ctx, cfg, tag) where the local daemon's image inspect fails: the image does not exist locally (e.g. pushed to remote and pruned locally), the tag string is malformed, the daemon is unreachable/restarting, or the daemon API call returns an unexpected error.
Common situations: Image built on a remote cluster/remote Docker host while skaffold inspects the local daemon; image pruned by `docker system prune` between build and digest lookup; Docker Desktop not running; wrong context (DOCKER_HOST pointing at a different daemon that lacks the image).
Related errors
- getting imageID for %q: %w
- pruning removed container: %w
- docker build: %w
- getting digest: %w
- loading image into docker daemon: %w
AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05).
Data as JSON: /api/errors/2f8059507bb0184e.
Report an issue: GitHub.