We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Using id 1000 is very restrictive.
Would be a tons better if one could just give the uid/gid through env variables like what linuxserver.io does: https://docs.linuxserver.io/general/understanding-puid-and-pgid
The text was updated successfully, but these errors were encountered:
That's the standard of node:alpine. But feel free to make some suggestions
Sorry, something went wrong.
Yes. That's why I'm suggesting to do the same as linuxserver does. (https://github.com/linuxserver/docker-baseimage-alpine/blob/master/root/etc/s6-overlay/s6-rc.d/init-adduser/run) Use PUID and PGID env variables (which will be given by the user creating the container with --env), and either create a new user in your image with those ids for ex.:
groupmod -o -g "$PGID" abc usermod -o -u "$PUID" abc . . chown abc:abc /folder_used_by_your_app
or change the uid/gid of use node to the one provided in the env variables, for ex.:
usermod -u "$PUID" node groupmod -g "$PGID" nodegroup . . find / -group "$PGID" -exec chgrp -h nodegroup {} \; find / -user "$PUID" -exec chown -h node {} \;
The last one of course assumes that the numbers given through env are available in the image itself, so probably the first one is safer to use.
If you like prep a pr
No branches or pull requests
Using id 1000 is very restrictive.
Would be a tons better if one could just give the uid/gid through env variables like what linuxserver.io does:
https://docs.linuxserver.io/general/understanding-puid-and-pgid
The text was updated successfully, but these errors were encountered: