docs: fix docker.sock group-add recipe on macOS - #7
Merged
Conversation
BSD stat -f '%g' on /var/run/docker.sock returns the symlink's gid, and Docker Desktop mounts the socket into containers as root:root 0660 — only group 0 grants access. Branch the recipe: stat -c '%g' on Linux, plain --group-add 0 on macOS.
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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 local-sandbox
docker runrecipe usedstat -f '%g' /var/run/docker.sockas the macOS fallback for--group-add. That is wrong twice over on macOS:/var/run/docker.sockis a symlink, and BSDstat -f '%g'returns the symlink's gid (1,daemon), not the target's.root:rootmode0660, so only group 0 grants access — the host socket's own gid is irrelevant.Branch the recipe:
stat -c '%g'on Linux, plain--group-add 0on macOS, with one sentence of why.Verified empirically in the druks install.sh, which writes gid 0 on Darwin and
stat -c '%g'on Linux.