diff --git a/docs/arc-dind.md b/docs/arc-dind.md index 95b2152e4..ccd1a0daf 100644 --- a/docs/arc-dind.md +++ b/docs/arc-dind.md @@ -9,6 +9,15 @@ When using ARC runners with a split runner/daemon filesystem (`DOCKER_HOST` side AWF validates the staged runner binary name before using it in chroot bootstrap paths. Per-run staged chroot-host directories remain unique and AWF prunes stale ones automatically from the shared staging root. +## Auto-detection of split filesystem setups + +AWF detects likely ARC/DinD environments at startup and warns when `--docker-host-path-prefix` is missing: + +- **Non-standard `DOCKER_HOST` unix socket**: any `unix://` socket outside `/var/run/docker.sock` and `/run/docker.sock` is treated as a sibling-daemon pod indicator. +- **`AWF_DIND=1`**: operators can set this environment variable to explicitly declare a DinD setup. + +When either signal is present and no explicit prefix is supplied, AWF emits a warning suggesting `--docker-host-path-prefix` (for example, `--docker-host-path-prefix /tmp/gh-aw` for typical ARC layouts). The DinD probe also considers `/tmp/gh-aw` as a candidate prefix when discovering the split-filesystem layout. + ## Remaining requirement: Node.js in the DinD-visible host filesystem Copilot CLI still requires `node` to be available inside the chrooted runtime PATH. Ensure your DinD image (or staged host toolcache) includes Node.js. diff --git a/docs/environment.md b/docs/environment.md index 183ce4020..94992a47c 100644 --- a/docs/environment.md +++ b/docs/environment.md @@ -135,6 +135,7 @@ The following environment variables are set internally by the firewall and used | `AWF_CHROOT_ENABLED` | Whether chroot mode is enabled | `true` | | `AWF_HOST_PATH` | Host PATH passed to chroot environment | `/usr/local/bin:/usr/bin` | | `AWF_SESSION_STATE_DIR` | Directory for Copilot CLI session state output (equivalent to `--session-state-dir`) | *(unset)* | +| `AWF_DIND` | Operator hint that AWF is running in a split runner/daemon (ARC/DinD) filesystem. Set to `1` to trigger the DinD warning when `--docker-host-path-prefix` is missing. See [arc-dind.md](arc-dind.md). | `1` | | `NO_PROXY` | Domains bypassing Squid (host access mode) | `localhost,host.docker.internal` | **Note:** Most of these are set automatically based on CLI options and should not be overridden manually. `AWF_SESSION_STATE_DIR` is an exception — it is the environment-variable equivalent of `--session-state-dir` and can be set by users to configure a predictable session-state output path.