Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bulletinmybeard/48b0485b8eae0630e69cd2f7f73890a6 to your computer and use it in GitHub Desktop.
Save bulletinmybeard/48b0485b8eae0630e69cd2f7f73890a6 to your computer and use it in GitHub Desktop.
Fix "Cannot connect to the Docker daemon" error on macOS/Linux
Cannot connect to the Docker daemon at unix:///Users/<username>/.local/share/containers/podman/machine/qemu/podman.sock. Is the docker daemon running?
  1. Check the $DOCKER_HOST environment variable to see which socket Docker is using by running echo $DOCKER_HOST in your terminal.
  2. Unset the $DOCKER_HOST environment variable with unset DOCKER_HOST.
  3. Check your terminal configurations, such as ~/.zshrc or ~/.bashrc, for a line like export DOCKER_HOST='unix:///Users/<username>/.local/share/containers/podman/machine/qemu/podman.sock' and remove it.
  4. Run source ~/.zshrc or exec $SHELL in your terminal to refresh the shell environment.

That's about it \w

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment