The Docker daemon is not running or your user lacks permission to access the Docker socket. Start the daemon service or add your user to the docker group.
This error occurs when the Docker CLI cannot communicate with the Docker daemon (dockerd). The daemon is the background service that manages containers, images, and networks. Without it running, no Docker commands can execute. The Docker socket at `/var/run/docker.sock` is a Unix socket that acts as the communication channel between the CLI and the daemon. If the daemon isn't running, or your user doesn't have permission to access this socket, you'll see this error.
First, verify whether the Docker service is active:
# On Linux with systemd
sudo systemctl status docker
# Or check if the process is running
ps aux | grep dockerdIf the service is inactive or the process isn't running, proceed to start it.
Start the Docker daemon using your system's service manager:
# On Linux with systemd
sudo systemctl start docker
# On older systems with SysVinit
sudo service docker start
# On macOS/Windows
# Open Docker Desktop applicationAfter starting, verify it's running with docker info.
To prevent this issue after reboots, enable the Docker service:
sudo systemctl enable dockerThis creates a symlink so Docker starts automatically when your system boots.
If Docker runs with sudo but not without it, add your user to the docker group:
sudo usermod -aG docker $USERImportant: Log out and log back in for the group change to take effect. Alternatively, run newgrp docker to activate the group in your current session.
Check that the Docker socket exists and has correct permissions:
ls -la /var/run/docker.sockThe socket should be owned by root:docker with permissions srw-rw----. If permissions are wrong:
sudo chmod 660 /var/run/docker.sock
sudo chown root:docker /var/run/docker.sockRootless Docker: If you're using rootless Docker, the socket path differs. Check $XDG_RUNTIME_DIR/docker.sock or set the DOCKER_HOST environment variable accordingly.
WSL2 Users: Ensure Docker Desktop's WSL2 integration is enabled in Settings → Resources → WSL Integration. The Docker daemon runs in a separate WSL2 distro managed by Docker Desktop.
SELinux: On systems with SELinux enabled, you may need to adjust contexts: sudo chcon -t container_runtime_exec_t /usr/bin/dockerd
unable to configure the Docker daemon with file /etc/docker/daemon.json
How to fix 'unable to configure the Docker daemon with file daemon.json' in Docker
docker: Error response from daemon: OCI runtime create failed: container_linux.go: starting container process caused: exec: "/docker-entrypoint.sh": stat /docker-entrypoint.sh: no such file or directory
How to fix 'exec: entrypoint.sh: no such file or directory' in Docker
image operating system "linux" cannot be used on this platform
How to fix 'image operating system linux cannot be used on this platform' in Docker
dockerfile parse error line 5: unknown instruction: RRUN
How to fix 'unknown instruction' Dockerfile parse error in Docker
manifest unknown: manifest unknown
How to fix 'manifest unknown' in Docker