Docker-alpine: groupadd and useradd absence?

Created on 23 Aug 2017  路  4Comments  路  Source: gliderlabs/docker-alpine

Hi,

I like very much the alpine image as it's ridiculously small and straight forward.
However there are things about user management that bothers me (and please forgive me if this has already been asked/discussed but I didn't find apart from #38 which isn't the same).

In fact there's no useradd nor groupadd. Which isn't particularly a problem but is in contradiction with docker's best practices:
[...]The Debian/Ubuntu adduser wrapper does not support the --no-log-init flag and should be avoided.[...]

And there are no packages.

So here I am, a bit confused, I thought Alpine would try to comply with Docker's recommendations as Docker had lately been recommending Alpine over Ubuntu. Is it planned to add those 2 ? Is Alpine useradd not touched by the problem reported by docker's team ?

Thank you in advance. :)

question

Most helpful comment

By default, Alpine comes with a pretty minimal set of packages, and so any
user manipulation tools likely come from BusyBox, which are often missing
functionality.

In this case, it looks like you probably want the "shadow" package (
https://pkgs.alpinelinux.org/contents?file=groupadd&branch=v3.6&arch=x86_64
).

All 4 comments

By default, Alpine comes with a pretty minimal set of packages, and so any
user manipulation tools likely come from BusyBox, which are often missing
functionality.

In this case, it looks like you probably want the "shadow" package (
https://pkgs.alpinelinux.org/contents?file=groupadd&branch=v3.6&arch=x86_64
).

Beat me to it!

Also, IIRC, the shadow package didn't actually exist at the time of #38 and I think someone built it around version 3.4 - 3.5 (I remember seeing something about someone working on it on the mailing list).

Well thanks for the answer. I don't want to reopen the issue, just share some thoughts.

I think I now get how the Alpine package website works but IHMO it is pretty confusing at first. And maybe shadow isn't the best name for a package since it has some pretty basic features in it? Maybe use an alias like essentials? I'm no linux expert so it is again just my opinion and it is out of the question scope and even from the docker-alpine. Thank you again. :)

The suite of tools is literally called "the shadow tool suite", thus the name: https://pkg-shadow.alioth.debian.org/. It isn't something specific to Alpine, it is the package name that most distributions use for these tools since that is what it is called upstream. I think I've sometimes seen the package called passwd as well (as they are generally tools for interacting with the passwd file).

Was this page helpful?
0 / 5 - 0 ratings