Cannot connect to the Docker daemon at unix:///home/pluslab/.docker/desktop/docker.sock.…
- User
Cannot connect to the Docker daemon at unix:///home/pluslab/.docker/desktop/docker.sock. Is the docker daemon running?
- Assistant
The error:
Cannot connect to the Docker daemon at unix:///home/pluslab/.docker/desktop/docker.sock. Is the docker daemon running?means that your Docker CLI is trying to talk to the Docker daemon via the UNIX socket at
/home/pluslab/.docker/desktop/docker.sock, but it can't connect.Here’s a step-by-step guide to troubleshoot and resolve this issue:
✅ 1. Check if Docker Daemon is Running
Run:
ps aux | grep dockerdYou should see the Docker daemon process (
dockerd) in the list. If not, Docker is not running.👉 Start Docker:
-
On Linux:
sudo systemctl start dockerThen check its status:
sudo systemctl status docker -
On Docker Desktop (Linux, Mac, Windows):
- Make sure Docker Desktop is started. Look for the whale icon in your system tray / taskbar.
- If you're using Docker Desktop, the daemon should start automatically with it.
✅ 2. Check Docker Socket Path
Normally, Docker uses:
/var/run/docker.sockBut you're using:
/home/pluslab/.docker/desktop/docker.sockThat path suggests you're using Docker Desktop for Linux or a custom configuration.
🛠 Option A: Use the default socket instead
Try running:
DOCKER_HOST=unix:///var/run/docker.sock docker infoIf this works, the Docker daemon may not be communicating through the custom socket you're using.
🛠 Option B: Check Docker Desktop Integration
If you installed Docker Desktop (not Docker Engine), the socket may be wrong or stale.
- Restart Docker Desktop.
- Go to Settings > Resources > Advanced
- Make sure backend services are enabled.
- Check if Docker is listening on the expected socket path.
✅ 3. Try Running Docker with
sudoSometimes permissions on the Docker socket may restrict access:
sudo docker infoIf this works but running
docker infoas your user does not, it's a permission issue.📌 Add user to docker group:
sudo usermod -aG docker $USERThen log out and log back in, or run:
newgrp docker
✅ 4. Verify Your Docker Context
Check current Docker context:
docker context lsYour current context might be set to
desktop-linux, which uses a different socket.You can switch back to the default context:
docker context use default
✅ 5. Restart Docker Service or Reboot
Sometimes sockets get corrupted or path bindings fail. Try:
sudo systemctl restart dockerOr restart Docker Desktop, OR simply reboot your machine.
✅ TL;DR Summary
Step What to Check ✅ Is Docker daemon ( dockerd) running?✅ Is the correct socket being used? ✅ Can you run Docker commands with sudo?✅ Are you in the dockergroup?✅ Are you using the correct Docker context? ✅ Have you tried restarting Docker/Desktop?
If none of this works, please share:
- Your OS and version
- How you installed Docker (Desktop or Engine)
- Output of
docker context lsanddocker info
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.