Skip to content

DockerMacOS

Ben Gur edited this page Dec 16, 2023 · 6 revisions

Debug Docker on MacOS

A few known issues/fixes

'Cannot connect to the Docker Daemon'

A common error when running docker commands:

user@host$ docker ps
Cannot connect to the Docker daemon at <UNIX SOCKET> Is the docker daemon running?

Fix #1: Check user privileges

Try running a docker command with sudo. If the command executes, go into your ~/.bashrc, ~/.bash_profile or ~/.zshrc and remove any of the following variables:

DOCKER_TLS_VERIFY
DOCKER_CERT_PATH
DOCKER_MACHINE_NAME
DOCKER_HOST

After restarting Docker you should be able to use commands without sudo.

Fix #2: Start Docker service

If installed with Docker Desktop, verify the service is "running" from the app dashboard or clicking the docker icon on the top bar. If not running, start/resume. You might have to update or re-install the app if the service won't run.

Docker Desktop Crashes/Restarts System

Docker Desktop and MacOS versions are usually dependent on each other, so incrementally updating your MacOS might fix the issue.

Clone this wiki locally