Skip to content
Latchkey

Skaffold "build failed: unable to stream build output" in CI

Skaffold streams a builder's output as it runs. "unable to stream build output" means that stream broke: the build process died, the Docker daemon became unreachable, or the runner killed it. The underlying build error is usually just above this line.

What this error means

A build step fails with "build failed: building [my-app]: ... unable to stream build output" without an obvious compiler error on that line.

skaffold
build failed: building [my-app]: build artifact: unable to stream build output:
error during connect: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.43/build": EOF

Common causes

The Docker daemon crashed or was killed

An out-of-memory kill or a daemon restart cuts the stream mid-build, so Skaffold reports it could not read the output.

The daemon is unreachable from the step

DOCKER_HOST points at a socket that is not available (no daemon, wrong path), so the build connection drops.

How to fix it

Confirm the Docker daemon is up

  1. Run docker info in a step before Skaffold to verify the daemon responds.
  2. If it is out of memory, reduce parallelism or use a larger runner.
  3. Re-run the build once the daemon is healthy.
Terminal
docker info
skaffold build --default-repo=us-docker.pkg.dev/my-project/my-repo

Switch to a daemonless builder

Use kaniko or buildpacks so the build does not depend on a running Docker daemon in CI.

skaffold.yaml
build:
  artifacts:
    - image: my-app
      kaniko: {}
  cluster: {}

How to prevent it

  • Check docker info before the build in CI.
  • Right-size the runner so the build is not OOM killed.
  • Prefer a daemonless builder (kaniko, buildpacks) where possible.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →