Skip to content

Use non-conflicting UID/GID for nonroot (e.g. 9999) — GID 999 is often taken by systemd-journal #84

Description

@tiborrr

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions