Skip to content

[ARC/DinD] AWF deletes tcp:// DOCKER_HOST instead of using it for container orchestration #4830

Description

@lpcox

Problem

In src/docker-host.ts, AWF unconditionally deletes any non-unix:// DOCKER_HOST value (line 44-48):

if (dockerHost && !dockerHost.startsWith('unix://')) {
  delete env.DOCKER_HOST;
}

This forces ARC users to provide a unix-socket path to the DinD daemon via a shared volume mount (e.g., unix:///dind-sock/docker.sock), even when a perfectly valid tcp://localhost:2375 endpoint exists and is the canonical way to reach the DinD sidecar in ARC RunnerScaleSet pods.

Current Behavior

  1. Runner pod has DOCKER_HOST=tcp://localhost:2375 (standard ARC DinD config)
  2. AWF detects non-unix scheme → deletes DOCKER_HOST
  3. AWF falls back to default /var/run/docker.sock — which does not exist in the runner container
  4. AWF docker/compose commands fail unless user provides a unix socket workaround

Expected Behavior

AWF should support tcp:// DOCKER_HOST for its own docker/compose orchestration commands. The tcp://localhost:2375 endpoint points to the same DinD daemon that a unix socket would — both are valid Docker API endpoints.

Proposed Fix

Instead of deleting tcp:// DOCKER_HOST, AWF should:

  1. Use it directly for its own docker compose calls (it works fine with tcp://)
  2. Only clear it from the agent container's environment if needed (the agent should talk to the host via the socket for DinD file access)
  3. Or: auto-detect and probe tcp:// endpoints before falling back

Context

Workaround

In workflow frontmatter:

engine:
  env:
    DOCKER_HOST: unix:///dind-sock/docker.sock

With a shared volume (dind-sock) between the runner container and DinD sidecar exposing the unix socket.

Metadata

Metadata

Assignees

Labels

arc-dindARC/DinD runner supportbugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions