The error:❌ “Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?” …means that your system (or Docker CLI) is trying to talk to the Docker service, but it isn’t running or accessible.
🛠 How to Fix It — Step-by-Step
✅ 1. Check if Docker is installed
Run:
If it says command not found, you need to install Docker first.
✅ 2. Start the Docker daemon
🔹 On Linux:
Try:
Then check:
To start it automatically on boot:
🔹 On macOS or Windows:
You must launch the Docker Desktop app (it starts the daemon).
Search for Docker Desktop and open it.
Wait until it says “Docker is running.”
Also Read: FIFA Visa Presale Registration 2026 | Who Can Register
✅ 3. Permission issue?
If the Docker daemon is running but you still get the error, it’s likely a permissions issue accessing the Docker socket (/var/run/docker.sock).
Try running your command with sudo:
Or add your user to the docker group:
Then log out and back in, or run:
✅ 4. Check Docker service logs (Linux)
To see why it might not be starting:
✅ 5. WSL 2 Users (Windows Subsystem for Linux)
If you’re using Docker via WSL:
Make sure Docker Desktop is running on Windows.
Inside WSL, you may need to set environment variables. Run:
You can add that line to your .bashrc or .zshrc if needed.
✅ Quick Test
Once fixed, try:
If it prints a welcome message, you’re good to go.
Be the first to comment