Skip to content

Cannot connect to the Docker daemon #232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
PickHub opened this issue Apr 11, 2025 · 2 comments
Open

Cannot connect to the Docker daemon #232

PickHub opened this issue Apr 11, 2025 · 2 comments
Labels
bug Something isn't working docker Pull requests that update docker code

Comments

@PickHub
Copy link

PickHub commented Apr 11, 2025

Describe the bug

When I click "Start server" for MCP, I get [warning] [server stderr] docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock..

Affected version

Please run docker run -i --rm ghcr.io/github/github-mcp-server ./github-mcp-server --version and paste the output below

$ docker run -i --rm ghcr.io/github/github-mcp-server ./github-mcp-server --version
bash: $: command not found
mage 'ghcr.io/github/github-mcp-server:latest' locally
latest: Pulling from github/github-mcp-server@PickHub ➜ /workspaces/cse-copilot $ Unable to find image 'ghcr.io/github/github-mcp-server:latest' locally

3d78e577de35: Pull complete 
bfb59b82a9b6: Pull cbash: Unable: command not found
omplete 
4eff9a62d888: Pull complete 
a62778643d56: Pull complete 
7c12895b777b: Pull complete 
3214@PickHub ➜ /workspaces/cse-copilot $ latest: Pulling from github/github-mcp-server
bash: latest:: command not found
acf345c0: Pull complete 
5664b15f108b: Pull complete 
0bab15eea81d: Pull complete 
4aa0ea1413d3: Pul@PickHub ➜ /workspaces/cse-copilot $ 3d78e577de35: Pull complete 
bash: 3d78e577de35:: command not found
l complete 
da7816fa955e: Pull complete 
9aee425378d2: Pull complete 
d00c3209d929: Pull complete 
2@PickHub ➜ /workspaces/cse-copilot $ bfb59b82a9b6: Pull complete 
bash: bfb59b82a9b6:: command not found
21438ca359c: Pull complete 
e76e88e5b481: Pull complete 
4d3ee8eeb83f: Pull complete 
Digest: sha256@PickHub ➜ /workspaces/cse-copilot $ 4eff9a62d888: Pull complete 
:faa1dfed068fb1d9c866a5ce4909947a5f2a5a72130815fbabash: 4eff9a62d888:: command not found
56c32bb441ca83f
Status: Downloaded newer image for ghcr.io/github/github-mcp-server:latest
server ve@PickHub ➜ /workspaces/cse-copilot $ a62778643d56: Pull complete 
bash: a62778643d56:: command not found
rsion v0.1.1 (7ab5d968e065f13a660cd123c2c5d0be6d8b6dbd) 2025-04-07T16:05:10Z@PickHub ➜ /workspaces/cse-copilot $ 7c12895b777b: Pull complete 
bash: 7c12895b777b:: command not found
@PickHub ➜ /workspaces/cse-copilot $ 3214acf345c0: Pull complete 
bash: 3214acf345c0:: command not found
@PickHub ➜ /workspaces/cse-copilot $ 5664b15f108b: Pull complete 
bash: 5664b15f108b:: command not found
@PickHub ➜ /workspaces/cse-copilot $ 0bab15eea81d: Pull complete 
bash: 0bab15eea81d:: command not found
@PickHub ➜ /workspaces/cse-copilot $ 4aa0ea1413d3: Pull complete 
bash: 4aa0ea1413d3:: command not found
@PickHub ➜ /workspaces/cse-copilot $ da7816fa955e: Pull complete 
bash: da7816fa955e:: command not found
@PickHub ➜ /workspaces/cse-copilot $ 9aee425378d2: Pull complete 
bash: 9aee425378d2:: command not found
@PickHub ➜ /workspaces/cse-copilot $ d00c3209d929: Pull complete 
bash: d00c3209d929:: command not found
@PickHub ➜ /workspaces/cse-copilot $ 221438ca359c: Pull complete 
bash: 221438ca359c:: command not found
@PickHub ➜ /workspaces/cse-copilot $ e76e88e5b481: Pull complete 
bash: e76e88e5b481:: command not found
@PickHub ➜ /workspaces/cse-copilot $ 4d3ee8eeb83f: Pull complete 
bash: 4d3ee8eeb83f:: command not found
@PickHub ➜ /workspaces/cse-copilot $ Digest: sha256:faa1dfed068fb1d9c866a5ce4909947a5f2a5a72130815fba56c32bb441ca83f
bash: Digest:: command not found
@PickHub ➜ /workspaces/cse-copilot $ Status: Downloaded newer image for ghcr.io/github/github-mcp-server:latest
bash: Status:: command not found
@PickHub ➜ /workspaces/cse-copilot $ server version v0.1.1 (7ab5d968e065f13a660cd123c2c5d0be6d8b6dbd) 2025-04-07T16:05:10Z
bash: syntax error near unexpected token `('
@PickHub ➜ /workspaces/cse-copilot $ ^C
@PickHub ➜ /workspaces/cse-copilot $ docker run -i --rm ghcr.io/github/github-mcp-server ./github-mcp-server --version
server version v0.1.1 (7ab5d968e065f13a660cd123c2c5d0be6d8b6dbd) 2025-04-07T16:05:10Z

Steps to reproduce the behavior

  1. Click on the red icon:
Image
  1. Select "Start server"

Expected vs actual behavior

I'd expect the server to start.

Logs

When I run the docker command myself I get the following:

$ docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server
Unable to find image 'ghcr.io/github/github-mcp-server:latest' locally
latest: Pulling from github/github-mcp-server
3d78e577de35: Pull complete 
bfb59b82a9b6: Pull complete 
4eff9a62d888: Pull complete 
a62778643d56: Pull complete 
7c12895b777b: Pull complete 
3214acf345c0: Pull complete 
5664b15f108b: Pull complete 
0bab15eea81d: Pull complete 
4aa0ea1413d3: Pull complete 
da7816fa955e: Pull complete 
9aee425378d2: Pull complete 
d00c3209d929: Pull complete 
221438ca359c: Pull complete 
e76e88e5b481: Pull complete 
4d3ee8eeb83f: Pull complete 
Digest: sha256:faa1dfed068fb1d9c866a5ce4909947a5f2a5a72130815fba56c32bb441ca83f
Status: Downloaded newer image for ghcr.io/github/github-mcp-server:latest
GitHub MCP Server running on stdio
^Ctime="2025-04-11T22:38:41Z" level=info msg="shutting down server..."
time="2025-04-11T22:38:41Z" level=info msg="stdioserverError reading input: context canceled"

vscode settings.json

"mcp": {
  "servers": {
    "github": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "GITHUB_PERSONAL_ACCESS_TOKEN",
        "ghcr.io/github/github-mcp-server"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "<redacted>"
      }
    }
  }
}
@PickHub PickHub added the bug Something isn't working label Apr 11, 2025
@SamMorrowDrums
Copy link
Collaborator

Hi, a few questions to debug further.

What platform are you on? If Mac or windows is docker desktop running?

And also if windows are you running the docker commands in WSL? Because VSCode might not be.

Let me know, and hope some of the above helps.

@SamMorrowDrums SamMorrowDrums added the docker Pull requests that update docker code label Apr 15, 2025
@Ronodeep
Copy link

Ronodeep commented Apr 19, 2025

I have also faced this issue. Here is what worked for me on macOS:

  1. Run docker info in the terminal. If it returns "ERROR: Cannot connect to the Docker daemon at unix:///Users/ronodeep/.docker/run/docker.sock. Is the docker daemon running?", it means Docker is not running or accessible.
  2. On macOS, I installed Docker Desktop using Homebrew: brew install --cask docker.
  3. Start Docker Desktop from the Applications folder or using Spotlight. Wait for Docker to finish starting up (the Docker icon should stop animating in the menu bar).
  4. Once Docker is running, try restarting the MCP server from your mcp.json or settings.json.
Image

After following these steps, the MCP server was able to connect to Docker successfully.

Hope this helps others facing the same problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docker Pull requests that update docker code
Projects
None yet
Development

No branches or pull requests

3 participants