Container UID collisions
Static versus dynamic allocation, and what that means across base images.
The mechanism
Debian Policy defines 100–999 as the dynamic system-user/group band; allocations can differ between systems. The pinned Alpine base package explicitly assigns some values in that band. A name in these base files is not proof of the identity present in every container image or on a host.
Evidence
- Debian Policy § 9.2.2 calls 100–999 dynamically allocated system users and groups, with the actual allocation controlled by adduser.conf.
- The pinned Alpine base files explicitly assign UID 123 ntp, UID 405 guest, GID 300 abuild, GID 406 utmp and GID 999 ping.
- Neither pinned passwd file assigns UID 999. The pinned Alpine group file assigns GID 999 to ping; UID and GID are separate identifiers.
Numeric IDs and user namespaces
Docker permits a numeric UID in --user even when no matching account name exists in the image. That numeric choice does not identify a service account by itself. Linux user namespaces can map container user/group IDs to different host IDs; permissions depend on the applicable mappings and credentials, not only a name in /etc/passwd.
Sources
| Distribution | Source package / version | Commit | Read from source |
|---|---|---|---|
| Debian | base-passwd 3.6.8 | a080557e1d59 | 2026-08-07 |
| Alpine Linux | alpine-baselayout 3.7.2 | a9c597c5cee0 | 2026-08-07 |
The Debian commit's changelog is headed 3.6.9 (UNRELEASED). The passwd.master, group.master and account documentation used here match the released base-passwd 3.6.8 files byte for byte. The 3.6.8 label identifies that validated release content, not the commit's changelog version.