fix: use groupmod/usermod -o to allow non-unique GID/UID on Mac#2
Draft
andreweacott wants to merge 1 commit into
Draft
fix: use groupmod/usermod -o to allow non-unique GID/UID on Mac#2andreweacott wants to merge 1 commit into
andreweacott wants to merge 1 commit into
Conversation
Closes mattpocock#609 on mattpocock/sandcastle. macOS hosts typically have UID 501 / GID 20 (staff). The Debian node:22-bookworm base image already has GID 20 (dialout), so groupmod refuses to reassign it. Adding -o (--non-unique) lets both groups share the GID — harmless since dialout is unused in agent containers. Same flag on usermod guards against UID collisions.
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.
Motivation
sandcastle docker build-imagefails on macOS because the host user's GID (20, thestaffgroup) collides with GID 20 (dialout) already present in thenode:22-bookwormDebian base image.groupmodrefuses to reassign a GID that already exists.Fixes mattpocock#609.
Proposed Changes
-o(--non-unique) togroupmodandusermodin all four Dockerfile templates inInitService.ts, and in the repo's own.sandcastle/Dockerfile-oallows a GID/UID to be shared between two entries — harmless here sincedialoutis unused in agent containers