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

Alpine "Best Practice", error "addgroup: gid '999' in use " #1539

Open
ampmonteiro opened this issue Aug 11, 2021 · 4 comments
Open

Alpine "Best Practice", error "addgroup: gid '999' in use " #1539

ampmonteiro opened this issue Aug 11, 2021 · 4 comments

Comments

@ampmonteiro
Copy link

Environment

  • Platform: Linux based Ubunu 20.04.2
  • Docker Version: 20.10.7, build f0df350
  • Node.js Version: 14-alpine
  • Image Tag: node:14-alpine

Expected Behavior

I need to change uid/gid , i i use the follow command from the docs :

RUN deluser --remove-home node \
  && addgroup -S node -g 999 \
  && adduser -S -G node -u 999 node

Current Behavior

The command not working because of follow error;

image

Steps to Reproduce

using the follow dockerfile config:

FROM node:14-alpine

RUN deluser --remove-home node \
    && addgroup -S node -g 999 \
    && adduser -S -G node -u 999 node

WORKDIR /app

RUN  chown -R  node /app

USER  node

COPY  package.json .

RUN npm i

COPY  . .

VOLUME [ "app/node_modules" ]

EXPOSE 4200

CMD [ "npm", "start" ]
@ampmonteiro ampmonteiro changed the title Alpine "Best Practice", error addgroup: gid '999' in use Alpine "Best Practice", error "addgroup: gid '999' in use " Aug 11, 2021
@sachasmart-weavik
Copy link

Did you resolve this? I'm currently running into this same issue -> node:18-alpine3.14

@pauloreis7
Copy link

same issue here

@mathpaquette
Copy link

whats going on ?

@joebowbeer
Copy link

Note that delgroup node was removed because the group had already been deleted:

#870

but you report that now the group can't be added because it hasn't been deleted.

So I would see if adding delgroup fixes it.

https://github.com/nodejs/docker-node/blob/main/14/alpine3.17/Dockerfile

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

No branches or pull requests

5 participants