Skip to content
Latchkey

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: build

Ensure a daemon is available

  1. On a VM runner, confirm the Docker service is started.
  2. When running inside a container, mount the host Docker socket.
  3. Verify with docker info before invoking Skaffold.
Terminal
sudo service docker start
docker info

How to prevent it

  • Choose kaniko or buildpacks for CI where no Docker daemon exists.
  • Verify docker info in a preflight step for local builds.
  • Do not assume a container job has the host socket mounted.

Related guides

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