7
I'm building a Docker container, and I need to add my user to a group. usermod
is not available in Alpine Linux by default. Apparently, you can add shadow
from apk
to install usermod
, but I would prefer to not install additional packages.
Is there an alternative way to add a user to a group, or an equivalent tool to usermod
available in Alpine?
Have you seen this? Basically adding environment variables for UID and GID when initializing. – JakeGould – 2019-01-17T17:20:32.113
2Why not simply modify the /etc/group file directly? – davidgo – 2019-01-17T18:12:09.373
@davidgo Some people don’t know you can just edit it like that but it’s a good solution. Would need to be scriptable via
sed
or something like that. – JakeGould – 2019-01-17T21:09:56.810