Description
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-awCLI: v0.71.1gh-aw-mcpgimage:ghcr.io/github/gh-aw-mcpg:v0.3.0- ARC:
gha-runner-scale-setHelm 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
- In
gh-aw-mcpgcontainer startup: Accept aDOCKER_HOSTenv var override and pass it through when launching the gateway container — currentlysrc/docker-manager.tsmay not propagate the host'sDOCKER_HOSTinto the mcpg container config. - Add
--docker-host <socket>CLI flag insrc/cli.tsto allow explicit socket path override. - Fix container ID detection: Use the
/proc/self/cgroupparsing fallback more robustly, or accept aAWF_CONTAINER_IDenv var as an explicit override for environments where cgroup parsing fails. - Document ARC/DinD setup in
docs/with the required Helm chart values and env var configuration.
Generated by Firewall Issue Dispatcher · ● 436.3K · ◷
Activity
github-actions commentedon Apr 29, 2026
👋 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 theDocker socket not found at /var/run/docker.sockandInvalid container ID formaterrors. Issue #2267 goes into deeper detail about three specific bugs (DOCKER_HOSTnot 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.
lpcox commentedon Apr 29, 2026
Closing — the three bugs identified are in the gh-aw (compiler/runtime) and mcpg (MCP gateway) codebases, not in gh-aw-firewall:
DOCKER_HOSTnot propagated to gateway container — The gateway is launched by gh-aw, not this repo--group-add 0— In gh-aw's gateway launch coderun_containerized.shThis 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_HOSThandling was already improved by merged PRs #1909, #1943, and #1924.