You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix --docker dood on SELinux hosts and CI test timeout
- Add --security-opt label=disable to all dood docker run invocations so the
agent container can access /var/run/docker.sock on SELinux-enforcing hosts
(Fedora, RHEL). :z relabeling is insufficient for Unix sockets.
- Add --group-add <gid> so the agent user's GID matches the host docker socket
GID regardless of what was baked into the image at build time.
- Fix CI test suite timeout: add 30s context timeout to run() helper and change
affected tests to pass --help so they exit before reaching runner.Run.
- Document dood security tradeoffs in --help output and AGENTS.md.
Generated by construct
Copy file name to clipboardExpand all lines: AGENTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,4 +65,4 @@ The integration tests in `cmd/construct/config_test.go` compile the binary thems
65
65
66
66
**No external Go dependencies** — `go.mod` declares no `require` directives. Everything is standard library + `os/exec` shelling out to `docker`.
67
67
68
-
**SELinux hosts (Fedora, RHEL, etc.)** — all host bind mounts must carry the `:z` relabeling suffix so SELinux grants the container access. This applies to `/workspace`, `/run/secrets`, and the home volume seed dir. Named Docker volumes do not need `:z`. If a container silently fails to read a bind-mounted path, a missing `:z` is the first thing to check.
68
+
**SELinux hosts (Fedora, RHEL, etc.)** — all host bind mounts must carry the `:z` relabeling suffix so SELinux grants the container access. This applies to `/workspace`, `/run/secrets`, and the home volume seed dir. Named Docker volumes do not need `:z`. Unix sockets (e.g. `/var/run/docker.sock` in DooD mode) **cannot** be relabeled with `:z` — use `--security-opt label=disable` on the container instead. If a container silently fails to read a bind-mounted path, a missing `:z` is the first thing to check; if it fails to access a socket, add `--security-opt label=disable`.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,9 @@
11
11
12
12
### Fixed
13
13
-**Container startup "Permission denied" errors** — the entrypoint script's heredoc that writes `~/.config/opencode/AGENTS.md` used an unquoted delimiter, causing the shell to treat backtick-wrapped paths (`` `/workspace` ``, `` `/home/agent` ``) as command substitutions. The delimiter is now quoted (`<< 'AGENTSEOF'`), preventing the errors `/workspace: Permission denied` and `/home/agent: Permission denied` on startup.
14
+
-**CI test suite timeout** — CLI integration tests that invoked the `construct` binary without a subcommand (e.g. `--port 3000 --port 8080` or bare `--`) would reach `runner.Run`, which blocks trying to connect to Docker on the GitHub Actions runner, causing the 10-minute test timeout to be hit with no output. Fixed by: (1) adding a 30-second context timeout to the `run()` test helper so any hanging subprocess fails fast with a clear message; (2) changing the affected tests (`TestPortFlag_MultipleAllowed`, `TestPassthrough_DoubleDashSeparatesToolArgs`, `TestPassthrough_FlagsBeforeDoubleDash`) to pass `--help`, which exits immediately after flag parsing; (3) simplifying `TestPassthrough_QsDoubleDash` to use a repo with no last-used entry so `qs` exits before reaching `runner.Run`.
15
+
-**`--docker dood` permission denied** — the agent user inside the container was added to a `docker` group baked into the image, but that group's GID rarely matches the host's Docker socket GID, causing `permission denied` when accessing `/var/run/docker.sock`. `runner` now stats the socket at startup, reads its GID, and passes `--group-add <gid>` to `docker run` so the agent user gains access to the socket regardless of how the host system assigns Docker group IDs.
16
+
-**`--docker dood` SELinux permission denied** — on SELinux-enforcing hosts (Fedora, RHEL, etc.), `:z` relabeling is insufficient for Unix sockets; the kernel denies access regardless of GID. DooD containers now pass `--security-opt label=disable` to disable SELinux confinement for the agent container, which is the correct fix for socket access. The `:z` suffix has been removed from the socket mount as it is redundant when label enforcement is disabled.
14
17
15
18
### Removed
16
19
-**copilot tool support dropped** — `opencode` is now the only supported tool. The `copilot` tool registration, its `GH_TOKEN` auth requirement, and all copilot-specific home-file seeding have been removed. See `docs/adr/002-opencode-as-sole-tool.md`.
0 commit comments