Skip to content

[ARC/DinD] Emit chroot.binariesSourcePath and chroot.identity in stdin-config for DinD topology #38906

Description

@lpcox

Problem

AWF gained chroot.binariesSourcePath and chroot.identity.* config support in gh-aw-firewall#4587, which would allow the copilot binary and runner identity to be properly resolved without workflow-level workarounds. However, gh-aw does not emit these fields in the stdin-config passed to AWF.

This forces ARC/DinD users to maintain a bootstrap action that:

  1. Copies the copilot binary into the DinD daemon's /usr/local/bin/ via docker run
  2. Creates a shim wrapper to set HOME/USER/LOGNAME env vars (because AWF chroot passes the wrong identity vars)
  3. Pre-seeds the DinD daemon's /etc/passwd with the runner UID

Expected Behavior

When gh-aw detects an ARC/DinD topology (e.g., DOCKER_HOST=tcp://... or a DinD sidecar pod), it should emit:

{
  "chroot": {
    "binariesSourcePath": "/path/to/staged/binaries",
    "identity": {
      "user": "runner",
      "uid": 1001,
      "gid": 1001,
      "home": "/tmp/gh-aw/home"
    }
  }
}

This would let AWF handle binary staging and identity resolution natively, eliminating the bootstrap action workaround entirely.

Context

Impact

Eliminating this workaround would:

  • Remove ~80 lines of bootstrap shell script from consumer repos
  • Remove the need to bake node into a custom DinD image
  • Remove the copilot shim wrapper (HOME/USER/LOGNAME override)
  • Make ARC/DinD a first-class supported topology

Metadata

Metadata

Assignees

Labels

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