Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore already existing UID/GIDs #139

Merged

Conversation

mpdude
Copy link
Contributor

@mpdude mpdude commented Sep 29, 2019

When trying to run a node container like so...

image: none

aliases:
    yarn:
        image: node:12-alpine
        script: yarn install

... I ran into the error message scubainit: GID 1000 already exists in /etc/group.

I guess the problem is that I am running locally as UID 1000, but the node packages also come with a node user with that UID by default (see nodejs/docker-node#289).

I think we could safely proceed in this case; Linux should be able to deal with multiple /etc/passwd (and /etc/group, FWIW) entries pointing to the same numerical ID.

Not sure if this solves #109, though.

@codecov-io
Copy link

codecov-io commented Sep 29, 2019

Codecov Report

Merging #139 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #139   +/-   ##
=======================================
  Coverage   94.96%   94.96%           
=======================================
  Files           9        9           
  Lines         616      616           
=======================================
  Hits          585      585           
  Misses         31       31

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5bd095a...254fc4a. Read the comment docs.

@JonathonReinhart JonathonReinhart merged commit 35f7479 into JonathonReinhart:master Mar 5, 2020
JonathonReinhart added a commit that referenced this pull request Mar 5, 2020
JonathonReinhart added a commit that referenced this pull request Apr 5, 2020
Commit 254fc4a (#139) relaxed the checks for existing passwd entries
matching the UID being added (and group, GID).

This relaxes those checks even further by allowing existing entries
which match both name *and* ID. We can't ignore the checks altogether
because if we added a duplicate name with a different ID, the name would
become ambiguous.

The only real use case I can think of here is for "root" but I suppose
there could be others, and this seems correct.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants