GoogleContainerTools/skaffold · error
loading image into docker daemon: %w
Error message
loading image into docker daemon: %w
What it means
localDaemon.Load wraps errors from apiClient.ImageLoad when streaming a tarball into the Docker daemon (`docker load`). This fires when the daemon rejects the load request itself — before any output streaming. The underlying client/daemon error is preserved via %w.
Source
Thrown at pkg/skaffold/docker/image.go:561
// 2. If `encodedRegistryAuth()` succeeded (so `err == nil`), then our credential was rejected, so
// return "" to retry as an anonymous pull.
return "", err
},
Platforms: platforms,
})
if err != nil {
return fmt.Errorf("pulling image from repository: %w", err)
}
defer rc.Close()
return streamDockerMessages(out, rc, nil)
}
// Load loads an image from a tar file. Returns the imageID for the loaded image.
func (l *localDaemon) Load(ctx context.Context, out io.Writer, input io.Reader, ref string) (string, error) {
resp, err := l.apiClient.ImageLoad(ctx, input)
if err != nil {
return "", fmt.Errorf("loading image into docker daemon: %w", err)
}
defer resp.Close()
if err := streamDockerMessages(out, resp, nil); err != nil {
return "", fmt.Errorf("reading from image load response: %w", err)
}
return l.ImageID(ctx, ref)
}
// Tag adds a tag to an image.
func (l *localDaemon) Tag(ctx context.Context, image, ref string) error {
_, err := l.apiClient.ImageTag(ctx, client.ImageTagOptions{Source: image, Target: ref})
return err
}
// For k8s, we need a unique, immutable ID for the image.
// k8s doesn't recognize the imageID or any combination of the image nameView on GitHub (pinned to a1189de023)
Solutions
- Confirm the daemon is reachable: `docker info` (start Docker Desktop / the docker service if not).
- Check socket permissions: add yourself to the `docker` group or fix DOCKER_HOST.
- Validate the input tar: `docker load -i <file>` manually; regenerate it if truncated (e.g. incomplete kaniko/jib build output).
- If the tar came from another tool, re-export in docker-compatible format (`docker save` or `podman save --format docker-archive`).
Example fix
// before: daemon down $ skaffold dev // after $ sudo systemctl start docker # or start Docker Desktop $ skaffold dev
Defensive patterns
Strategy: validation
Validate before calling
// daemon reachable and input is a non-empty reader before calling Load
if err := client.Info(ctx); err != nil { return fmt.Errorf("docker daemon unreachable: %w", err) }
fi, err := tarFile.Stat()
if err != nil || fi.Size() == 0 { return errors.New("image tar missing or empty") } Prevention
- Check `docker info` as a pre-flight in scripts that call Load.
- Validate tar archives (size > 0, `tar -tf` succeeds) before loading.
- Ensure the user is in the `docker` group or DOCKER_HOST is set correctly.
- Export archives in docker-compatible format when mixing container tools.
When it happens
Trigger: Calling Load(ctx, out, input, ref) when ImageLoad fails: Docker daemon not running/unreachable, the input reader yields an invalid or truncated tar archive, or permission denied on the Docker socket.
Common situations: Docker Desktop stopped while running skaffold, a corrupted or empty image tar passed as input, user not in the `docker` group (permission denied on /var/run/docker.sock), loading a tar produced by a different container tool (e.g. podman save with incompatible format).
Related errors
- getting relative tar paths: %w
- creating tar gz: %w
- StatusCode_BUILD_DOCKER_GET_DIGEST_ERR
- pruning removed container: %w
- creating docker context: %w
AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05).
Data as JSON: /api/errors/082c76088a6b976b.
Report an issue: GitHub.