Repository navigation
feat: let chezmoi agent profiles use the host Docker engine - #42
Merged
Merged
Conversation
The installer's container tests need Docker, but nono sandboxes block the engine socket, so agents working on this repository could not run them. Profiles now opt in to Docker through a per-profile feature declared in the agent shell files, which both the shell launchers and the editor ACP launcher load. At launch, the shared wrapper grants the socket of each installed runtime (OrbStack, Colima, Docker Desktop) only when the socket is a real socket owned by the user and not writable by others. Agents use a separate Docker client config that lists plugin folders but holds no registry logins, so ~/.docker stays denied. Only OrbStack on macOS has been tested; the Linux gaps are documented.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Summary
The installer's container tests need Docker, but nono sandboxes block the engine socket, so sandboxed agents working on this repository could not run them. This PR lets the chezmoi agent profiles (Claude Code, Codex, OpenCode) reach the host Docker engine through an opt-in, per-profile feature. Socket grants are added at launch only for installed runtimes and trusted sockets, and agents use a separate Docker client config without registry logins.
Key Decisions
🧩 Per-profile sandbox features
nono.zshgains a generic registry,_nono_agent_enable <profile> <feature>and_nono_agent_has_feature, that holds no profile names. Each agent shell file declares its features at file level, not inside launcher functions, because editors start agents throughnono-agent-acp, which sources the agent files but calls the internal launch helpers directly. A declaration at file level reaches both the shell launchers and the editor path.🔌 Socket selection at launch
Docker sockets are granted by
_nono_agent_run, not listed in nono profiles. A profileunix_socketentry would grant whatever socket exists at that path at launch. The launcher considers a socket only when its runtime is installed (OrbStack, Docker Desktop, or Colima), and only when the path is a real socket (not a symlink), owned by the user, and not writable by group or others.🔐 Docker client config without logins
~/.dockerstays denied, becauseconfig.jsoncan hold registry logins, and its credential helpers can read the keychain. Docker-enabled agents getDOCKER_CONFIG=~/.config/docker-agent, which only lists the runtime plugin folders socomposeandbuildxstill work. Like the read-only package caches in the language profiles, agents can use Docker but cannot log in or push.BUILDX_CONFIGpoints at a writable cache folder, because the client config is read-only inside the sandbox.🐧 Linux untested
Only OrbStack on macOS has been tested. On Linux, native Docker Engine (
/run/docker.sock) and rootless Docker are not covered. nono also does not check Unix socket connections on Linux unless a profile setslinux.af_unix_mediation: "pathname", so the opt-in may not be enforced there. The process doc, domain doc, and nono skill record this gap.🔄 Before & After
dockerfails~/.docker, warning on every command