Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docke

Docker daemon not running on macOS? Here's the real fix

Docker Desktop on macOS isn't running or its socket isn't linked. Start Docker, check the CLI context, or fix the symlink. Here's how.

You open Terminal, type docker ps, and get hit with Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? It usually happens right after a reboot, a Docker Desktop update, or when you quit the app to free up RAM and forgot to restart it. Had a client last month whose entire dev team hit this after a macOS Sonoma 14.5 update — Docker Desktop silently failed to launch on login and nobody noticed until standup.

On macOS, there is no native Docker daemon. Unlike Linux, you don't have systemd running dockerd in the background. Docker Desktop runs a lightweight Linux VM (using Apple's Virtualization framework or HyperKit) and the daemon lives inside that VM. Your docker CLI talks to it through a Unix socket that Docker Desktop maps to /var/run/docker.sock. If Docker Desktop isn't running, or the socket isn't linked, the CLI has nothing to talk to.

The real fix

  1. Start Docker Desktop. Open Spotlight (Cmd + Space), type "Docker", hit Enter. Wait for the whale icon in your menu bar to stop animating. It can take 20–40 seconds on older Intel Macs. Don't just glance and assume — the icon spins until the daemon is actually up.
  2. Check it's actually running. Run:
    docker info
    If you see Server Version, CPU count, and storage driver info, you're done. If you still get the socket error, keep going.
  3. Verify the socket link exists. Docker Desktop creates a symlink for CLI compatibility:
    ls -la /var/run/docker.sock
    ls -la ~/.docker/run/docker.sock
    If /var/run/docker.sock is missing but ~/.docker/run/docker.sock exists, your CLI context is pointing at the wrong place.
  4. Check your Docker context. This trips up a lot of people who've used Docker with remote hosts or Colima:
    docker context ls
    The active context (marked with *) should be desktop-linux. If it's something like colima or a remote host, switch back:
    docker context use desktop-linux
  5. Restart Docker Desktop cleanly. Quit it fully from the whale menu (not just closing the window). Then:
    killall Docker && open -a Docker
    Give it 30 seconds. Run docker ps again.
  6. If the daemon refuses to start, reset the VM. In Docker Desktop, go to Troubleshoot (bug icon) → Clean / Purge data is nuclear — don't do that unless you can lose your images and volumes. First try Restart from the same menu. That restarts the VM without nuking data.

If it still fails

Here's the stuff that actually matters once the basics are done.

Check the CLI version matches. If you installed docker via Homebrew separately from Docker Desktop, you can end up with two competing installs. Run which -a docker. If it shows /usr/local/bin/docker and /opt/homebrew/bin/docker, that's your problem. Remove the Homebrew one:

brew uninstall docker docker-compose
# Then in Docker Desktop: Settings → Advanced → Install CLI tools

Look at the Docker Desktop logs. Settings → Troubleshoot → Open logs. Grep for "Fatal" or "error". I've seen a corrupted settings-store.json in ~/Library/Group Containers/group.com.docker/ cause the daemon to silently die on launch. Renaming that file (Docker recreates it) fixes it.

Rosetta on Apple Silicon. If you're on an M1/M2/M3 Mac and you've set Docker Desktop to run under Rosetta, the daemon can be flaky. Make sure Settings → General → Use Rosetta for x86/amd64 emulation is only checked if you actually need x86 emulation. Unchecking it fixed a Mac Studio for me last week where the daemon hung at "Starting" indefinitely.

Resource limits. Settings → Resources. If you gave Docker 2GB of RAM and 2 CPUs, it can fail to boot the VM under load. Bump to at least 4GB RAM and 4 CPUs on modern Macs. This is especially true for anyone running a k8s cluster or heavy Compose stack.

One more thing: if you're using Colima instead of Docker Desktop, this error means colima start hasn't been run since reboot. Check colima status and start it. The socket path is different — usually ~/.colima/default/docker.sock — and the context should be colima, not desktop-linux.

Nine times out of ten it's just "Docker Desktop isn't running." The other one time, it's the context or a broken symlink. Rarely is it anything more exotic than that. Don't reinstall Docker Desktop first — that's a waste of 10 minutes and it usually doesn't fix the problem anyway.

Related Errors in Programming & Dev Tools
ModuleNotFoundError: No module named 'requests' Fix ModuleNotFoundError: No module named 'requests' in venv Parsing error: Unexpected token ESLint Unexpected token in TypeScript interface fix 0XC000070A STATUS_THREADPOOL_HANDLE_EXCEPTION (0xC000070A) – Fix It Now EADDRINUSE Node.js EADDRINUSE: address already in use when restarting server

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.