fix: handle pre-existing GID in Dockerfile templates for macOS hosts#613
Open
hlynurstef wants to merge 1 commit into
Open
fix: handle pre-existing GID in Dockerfile templates for macOS hosts#613hlynurstef wants to merge 1 commit into
hlynurstef wants to merge 1 commit into
Conversation
|
@hlynurstef is attempting to deploy a commit to the Matt Pocock's projects Team on Vercel. A member of the Team first needs to authorize it. |
On macOS the host GID is typically 20 (staff), which collides with GID 20 (dialout) already present in node:22-bookworm. groupmod refuses to reassign a GID that already exists, causing docker build-image to fail with exit code 4. Adding -o (non-unique) to both groupmod and usermod lets the node group share GID 20 with dialout. The collision is harmless since dialout is unused in agent containers. Applied to all four Dockerfile templates in InitService.ts (claude-code, pi, codex, opencode) and to the repo's own .sandcastle/Dockerfile. Fixes mattpocock#609 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
29c4dba to
b4d402b
Compare
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
-o(--non-unique) togroupmodandusermodin all four Dockerfile templates inInitService.ts(claude-code, pi, codex, opencode) and in the repo's own.sandcastle/DockerfileRoot cause
On macOS, the host GID is typically
20(staff). The basenode:22-bookwormimage already has GID20assigned to thedialoutgroup. When sandcastle passesAGENT_GID=20at image build time,groupmodrefuses with:Fix
Adding
-o(--non-unique) to bothgroupmodandusermodallows thenodegroup to share GID 20 withdialout. The collision is harmless —dialoutis unused in agent containers.RUN groupmod -o -g $AGENT_GID node && usermod -o -u $AGENT_UID -g $AGENT_GID -d /home/agent -m -l agent nodeCloses #609
🤖 Generated with Claude Code