fix(setup): document the Docker CLI and plugin paths the socket allowlist misses - #1184
Merged
Merged
Conversation
…list misses On macOS with Docker Desktop the documented recipe cannot produce a working docker. It allows the daemon socket, but Docker Desktop installs the CLI *inside* the denied directory — `docker` on PATH is `~/.docker/bin/docker` — so the shell cannot execute the binary at all and dies with `operation not permitted: docker` before the socket is ever consulted. Allowing `~/.docker/bin/` alone then gets `docker ps` working while `docker compose` still reports `unknown command`, because compose and buildx are plugin binaries under `~/.docker/cli-plugins/`, also inside the denial. Any compose-driven workflow stays broken. The symptom section listed only daemon-connection errors, which are not what an adopter on this platform sees first, so the page did not lead them to the entry that would have helped. Verified on macOS 26 with Docker Desktop: with all three paths allowed, `docker ps`, `docker compose version` (v5.5.1) and `docker buildx version` all succeed, while `~/.docker/config.json` stays denied so the agent still cannot read registry credentials. Generated-by: Claude Code (Opus 5)
…latform Listing a socket in `sandbox.filesystem.allowRead` grants permission to read the file, not to connect to it — socket connections are gated by the separate `sandbox.network.allowUnixSockets` list. With the path allowed for reading but missing from that list, the CLI starts, finds the socket, and is refused at connect time with "permission denied while trying to connect to the docker API". Unlike the CLI-path gap this recipe already covers, this one is not macOS-specific: a Linux adopter on /var/run/docker.sock hits it too, so the recipe as published could not produce a working docker anywhere. Established by removing the entry while leaving the allowRead socket paths in place: `docker compose version` still ran (the plugin binary never touches the daemon) while `docker ps` failed at connect. Restoring it fixed `docker ps` with nothing else changed. Generated-by: Claude Code (Opus 5)
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.
The Docker / Podman command fails with a socket error recipe cannot produce a working docker. It has three gaps — one on every platform, two specific to macOS with Docker Desktop.
1.
allowUnixSockets— every platformListing a socket in
sandbox.filesystem.allowReadgrants permission to read the file, not to connect to it. Socket connections are gated by the separatesandbox.network.allowUnixSocketslist, which the recipe never mentions. With the path allowed for reading but absent from that list:This is not macOS-specific — a Linux adopter on
/var/run/docker.sockhits it identically. As published, the recipe could not produce a working docker on any platform.2. The CLI itself — macOS
Docker Desktop installs the
dockerbinary inside the denied directory:Denied, the shell cannot execute it at all —
operation not permitted: docker, before the socket is ever consulted.3. The CLI plugins — macOS
Allowing
~/.docker/bin/getsdocker psworking, so it looks fixed. Butdocker composeanddocker buildxare not builtins — they are plugin binaries under~/.docker/cli-plugins/, also inside the denial:Any compose-driven workflow stays broken, which reads as a Docker Desktop fault rather than a sandbox one.
Symptom section
The listed symptoms were all "daemon not running" errors. None of the three failures above produces one, so an adopter had nothing to match against and no reason to land on this entry. All three forms added.
Verification
macOS 26, Docker Desktop, server 29.7.2.
docker psoperation not permitted: dockerdocker compose versionunknown commanddocker buildx versionunknown command~/.docker/config.jsonGap 1 was isolated by removing
allowUnixSocketswhile leaving theallowReadsocket paths in place:docker compose versionstill ran — the plugin binary never touches the daemon — whiledocker psfailed at connect. Restoring it fixeddocker pswith nothing else changed, which is what distinguishes the two permissions.The credential denial is unaffected throughout:
dockeremits a benignError loading config filewarning and works normally, preserving the intended split — Bash may use the socket, the agent may not read the tokens.prek run --files docs/setup/sandbox-troubleshooting.md: all green.Generated-by: Claude Code (Opus 5)