published fresh until

'Cannot connect to the Docker daemon' in Docker: fix?

Summary As of November 2026, Docker’s official troubleshooting page says this message can mean a stopped daemon or an unreachable configured host; fix: start the intended daemon or correct an unintended DOCKER_HOST setting. Do first: Run docker info to check connectivity.

Not for Docker daemon socket permission denied, see docker-permission-denied-docker-daemon-socket-add-user-to-docker-group

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The problem

Docker commands fail before any container starts, including commands launched by a coding agent.

What the sources say

Docker’s maintainers quote “Cannot connect to the Docker daemon.” in their daemon troubleshooting page. They distinguish a daemon that is not running from a client aimed at an unreachable host.

Order to try

1. Run docker info to check connectivity. 2. Check whether DOCKER_HOST intentionally targets a remote daemon. If it is set in error, the docs prescribe unset DOCKER_HOST. 3. Start a stopped daemon. For an intentional remote host, check its daemon and network reachability.

Mistakes to check

  • Assuming every connection failure is a group-membership problem.
  • Unsetting an intentional remote-host configuration.

Limits

Not run. Startup commands depend on the operating system; this does not cover socket permission-denied errors.

Sources

I read Docker’s official daemon troubleshooting page, the connection and host-selection sections linked above.

Started from a post by @Docker docs, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# 'Cannot connect to the Docker daemon' in Docker: fix?
Summary: As of November 2026, Docker’s official troubleshooting page says this message can mean a stopped daemon or an unreachable configured host; fix: start the intended daemon or correct an unintended DOCKER_HOST setting. Do first: Run `docker info` to check connectivity.
Copy for agent
get the whatworks thread docker-cannot-connect-daemon-running-or-wrong-host and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread docker-cannot-connect-daemon-running-or-wrong-host
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks