GitLab CI: Cannot connect to the Docker daemon at tcp://docker:2375. Is the docker daemon running?
A docker-in-docker job could not reach the docker:dind service — it is not started, not privileged, or the TLS/host settings do not match.
Cannot connect to the Docker daemon at tcp://docker:2375Is the docker daemon running? GitLabCannot connect to the Docker daemon at unix:///var/run/docker.sock gitlab runnerdocker:dind service not starting Meaning
With the Docker executor, builds need the docker:dind service, a privileged runner, and matching DOCKER_HOST/DOCKER_TLS_CERTDIR. Newer images enable TLS on port 2376, so an old tcp://docker:2375 setting breaks. Alternatively mount /var/run/docker.sock or use Kaniko/BuildKit without a daemon.
Common causes
docker:dindservice missing from the job- Runner not privileged (
privileged = truerequired for dind) DOCKER_HOSTpoints to 2375 while TLS is on (or reverse)- Shell executor without Docker installed for the gitlab-runner user
- Docker client and dind versions mismatched
⚡ Quick fix
- Add
services: [docker:27-dind]andvariables: DOCKER_TLS_CERTDIR: "/certs" - Enable
privileged = truein the runner config.toml - Or build without a daemon using Kaniko
Detailed fix by platform
GitLab CI
- Runner config:
[runners.docker] privileged = truethen restart gitlab-runner
Code examples
Docker-in-Docker with TLS
build-image:
image: docker:27
services: [docker:27-dind]
variables:
DOCKER_TLS_CERTDIR: "/certs"
script:
- docker info
- docker build -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA" .How to diagnose
- Service — dind listed in services?
- Privileged — Runner privileged?
- Host — DOCKER_HOST and TLS consistent?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- .gitlab-ci.yml invalid GitLab CI: Found errors in your .gitlab-ci.yml: jobs:build config contains unknown keys: scripts
- Cannot perform an interactive login from a non TTY device GitHub Actions: Error: Cannot perform an interactive login from a non TTY device
- Container exceeded memory limit Bitbucket Pipelines: Container 'Build' exceeded memory limit / Docker container exited with code 137
Most viewed in CI/CD
- The process '/usr/bin/git' failed with exit code 128 GitHub Actions: Error: The process '/usr/bin/git' failed with exit code 128
- This job is stuck because you don't have any active runners GitLab CI: This job is stuck because you don't have any active runners online or available with any of these tags assigned to them
- Resource not accessible by integration GitHub Actions: Error: Resource not accessible by integration (403)
Other ways to find it
Where this error sits
Origin: Build & delivery. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 25 Oct 2026