Skip to content

[awf] ARC/DinD: agent entrypoint clobbers HOME/USER/LOGNAME and rejects Alpine chroot hosts #4567

Description

@lpcox

Problem

On ARC/DinD (Kubernetes) runners, AWF v0.75.4 requires six distinct workflow-level workarounds to run Copilot in chroot mode. Key AWF-specific failures: (1) chroot rejects Alpine/musl DinD hosts — capsh not found and /bin/sh: No such file or directory because AWF assumes glibc; (2) entrypoint.sh clobbers HOME/USER/LOGNAME to AWF container values after capsh, ignoring engine.env overrides, causing Copilot to fail writing ~/.copilot/state; (3) runner-installed binaries (copilot) are invisible in chroot because AWF bind-mounts the DinD daemon's /usr, not the runner's /usr.

Context

Source issue: github/gh-aw#34896

Reproduction: ARC EKS scale-set, docker:dind (Alpine), DOCKER_HOST=(localhost/redacted) sandbox.agent.id: awf`, chroot mode.

Root Cause

containers/agent/entrypoint.sh applies the identity triple (HOME/USER/LOGNAME) from the AWF container environment before capsh's user-switch, so engine.env values are overridden. Chroot probe assumes glibc host and does not fall back for musl/Alpine DinD images.

Proposed Solution

  • Fix containers/agent/entrypoint.sh: apply HOME/USER/LOGNAME from engine.env AFTER capsh user-switch, not before.
  • Publish a glibc-based companion DinD image (ghcr.io/github/gh-aw-firewall/dind-ubuntu:latest) with docker-ce, libcap2-bin, and Node.js pre-installed; document as the recommended ARC DinD base.
  • Add an awf.chroot.binaries_source_path option to src/docker-manager.ts so runner-side binaries (copilot) can be overlaid alongside the daemon-side /usr mount without a pre-run copy step.

Generated by Firewall Issue Dispatcher · sonnet46 2.5M ·

Metadata

Metadata

Assignees

Type

No type
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