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.
build failed: building [my-app]: build artifact: unable to stream build output:
error during connect: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.43/build": EOFCommon 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
- Run
docker infoin a step before Skaffold to verify the daemon responds. - If it is out of memory, reduce parallelism or use a larger runner.
- Re-run the build once the daemon is healthy.
docker info
skaffold build --default-repo=us-docker.pkg.dev/my-project/my-repoSwitch to a daemonless builder
Use kaniko or buildpacks so the build does not depend on a running Docker daemon in CI.
build:
artifacts:
- image: my-app
kaniko: {}
cluster: {}How to prevent it
- Check
docker infobefore the build in CI. - Right-size the runner so the build is not OOM killed.
- Prefer a daemonless builder (kaniko, buildpacks) where possible.