Summary
Examples that create an app user with UID/GID 999 can fail once the image installs packages that pull in systemd, because Debian/Ubuntu postinst scripts commonly create the systemd-journal group with GID 999. After that, groupadd --gid 999 … exits with code 4 (“GID already exists”).
Suggestion
In Docker examples that hard-code a non-root user, prefer a high, uncommon UID/GID pair (e.g. 9999) or omit fixed IDs and let useradd/groupadd allocate, and document why 999 is risky in “full” images.
Motivation
systemd-journal on GID 999 is very common on Debian-derived images once systemd is present, so 999 is a poor default for custom application users in recipes that may combine uv/Python slim with desktop/browser or other systemd-using stacks.
Assisted by Cursor
Summary
Examples that create an app user with UID/GID 999 can fail once the image installs packages that pull in systemd, because Debian/Ubuntu postinst scripts commonly create the
systemd-journalgroup with GID 999. After that,groupadd --gid 999 …exits with code 4 (“GID already exists”).Suggestion
In Docker examples that hard-code a non-root user, prefer a high, uncommon UID/GID pair (e.g. 9999) or omit fixed IDs and let
useradd/groupaddallocate, and document why 999 is risky in “full” images.Motivation
systemd-journalon GID 999 is very common on Debian-derived images once systemd is present, so 999 is a poor default for custom application users in recipes that may combineuv/Python slim with desktop/browser or other systemd-using stacks.Assisted by Cursor