Skip to content

[awf] mcpg: MCP gateway fails on ARC self-hosted runners — Docker socket not found with DinD sidecar #2292

Closed

Description

@lpcox

Problem

When running an agentic workflow on a self-hosted runner deployed via actions-runner-controller (ARC) on Kubernetes with a Docker-in-Docker sidecar, the MCP gateway (gh-aw-mcpg) fails to start with:

Docker socket not found at /var/run/docker.sock
Invalid container ID format

This occurs even when DOCKER_HOST=unix:///var/run/docker.sock is set on the runner container and the socket is correctly exposed on the pod.

Context

Reported in github/gh-aw#28888.

Environment:

  • gh-aw CLI: v0.71.1
  • gh-aw-mcpg image: ghcr.io/github/gh-aw-mcpg:v0.3.0
  • ARC: gha-runner-scale-set Helm chart 0.13.1
  • Runner image: ghcr.io/actions/action-runner

Root Cause

The MCP gateway container (gh-aw-mcpg) detects the Docker socket by looking at DOCKER_HOST or defaulting to /var/run/docker.sock. On ARC with DinD, the socket path on the runner pod differs (e.g., /run/docker.sock or a TCP socket like tcp://localhost:2375). The container ID format error suggests the gateway is attempting to inspect itself via Docker API but is reading a container ID from a cgroup path that differs in Kubernetes (e.g., containerd vs Docker shim format).

Proposed Solution

  1. In gh-aw-mcpg container startup: Accept a DOCKER_HOST env var override and pass it through when launching the gateway container — currently src/docker-manager.ts may not propagate the host's DOCKER_HOST into the mcpg container config.
  2. Add --docker-host <socket> CLI flag in src/cli.ts to allow explicit socket path override.
  3. Fix container ID detection: Use the /proc/self/cgroup parsing fallback more robustly, or accept a AWF_CONTAINER_ID env var as an explicit override for environments where cgroup parsing fails.
  4. Document ARC/DinD setup in docs/ with the required Helm chart values and env var configuration.

Generated by Firewall Issue Dispatcher · ● 436.3K · ◷

Activity

  1. github-actions commented on Apr 29, 2026

    @github-actions
    Contributor

    👋 Hello! I noticed this issue might be related to an existing issue:

    Both issues describe the same root problem: the MCP gateway (gh-aw-mcpg) failing on ARC self-hosted runners with DinD, specifically the Docker socket not found at /var/run/docker.sock and Invalid container ID format errors. Issue #2267 goes into deeper detail about three specific bugs (DOCKER_HOST not propagated, hardcoded --group-add 0, and container-ID regex rejecting Kubernetes cgroup names).

    If #2267's fix already addressed this, this issue may be a regression or a slightly different variant. If it's the same problem, please consider referencing or closing as a duplicate.

    This is an automated message from the issue duplication detector.

    Generated by Issue Duplication Detector for issue #2292 · ● 136.7K · ◷

  2. lpcox commented on Apr 29, 2026

    @lpcox
    CollaboratorAuthor

    Closing — the three bugs identified are in the gh-aw (compiler/runtime) and mcpg (MCP gateway) codebases, not in gh-aw-firewall:

    1. DOCKER_HOST not propagated to gateway container — The gateway is launched by gh-aw, not this repo
    2. Hardcoded --group-add 0 — In gh-aw's gateway launch code
    3. Container-ID regex rejects K8s cgroup names — In mcpg's run_containerized.sh

    This is a duplicate of the previously closed #2267. The upstream issue gh-aw#28888 is the correct place to track these fixes.

    Note: AWF's own DOCKER_HOST handling was already improved by merged PRs #1909, #1943, and #1924.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions