Skaffold "the build requires a running Docker daemon" in CI
Skaffold's docker builder shells out to a Docker daemon. On a runner where no daemon is running (or the socket is not mounted), Skaffold cannot build and reports that it needs one.
What this error means
The build fails with "the docker build requires a running docker daemon" or "Cannot connect to the Docker daemon at unix:///var/run/docker.sock".
skaffold
Cannot connect to the Docker daemon at unix:///var/run/docker.sock.
Is the docker daemon running?Common causes
No Docker daemon on the runner
Container-based or minimal runners often have no Docker service, so the local docker builder has nothing to connect to.
The socket is not exposed to the step
A job runs inside a container without the host socket mounted, so /var/run/docker.sock is missing.
How to fix it
Use a daemonless builder instead
For CI without Docker, build with kaniko (in-cluster) or buildpacks so no daemon is required.
skaffold.yaml
build:
artifacts:
- image: my-app
kaniko:
dockerfile: Dockerfile
cluster:
namespace: buildEnsure a daemon is available
- On a VM runner, confirm the Docker service is started.
- When running inside a container, mount the host Docker socket.
- Verify with
docker infobefore invoking Skaffold.
Terminal
sudo service docker start
docker infoHow to prevent it
- Choose kaniko or buildpacks for CI where no Docker daemon exists.
- Verify
docker infoin a preflight step for local builds. - Do not assume a container job has the host socket mounted.
Related guides
Skaffold "build failed: unable to stream build output" in CIFix Skaffold "build failed: ... unable to stream build output" in CI - the builder process ended unexpectedly…
Skaffold "kaniko build failed" in CIFix Skaffold "building [image]: kaniko build failed" in CI - the in-cluster kaniko pod could not build or pus…
Skaffold "docker build failed" in CIFix Skaffold "building [image]: docker build failed" in CI - the Dockerfile build returned non-zero. The real…