Docker: use a fixed UID (14237) for the bugsink user

* Rebuilding the image will not accidentally assign a different UID to `bugsink`
  this would be "extremely annoying" in the context of bind-mounts and volumes.
* Ensures predictable ownership for bind-mounts and Docker volumes at build time.
* Avoids collisions with existing host accounts

Considerations for 14237:

* well below the 65535 limit, keeping it compatible with default subuid/subgid mappings.
* Positioned above 1000 to steer clear of standard system and regular user ranges.
* Not so large that older filesystems or tooling (e.g., simple NFS exports) might have issues.

See #176
This commit is contained in:
Klaas van Schelven
2025-07-31 11:01:51 +02:00
parent 53753bc904
commit 488d0190bb
2 changed files with 4 additions and 4 deletions

View File

@@ -47,8 +47,8 @@ COPY bugsink/conf_templates/docker.py.template bugsink_conf.py
RUN apt update && apt install -y git
RUN pip install -e .
RUN groupadd -r bugsink \
&& useradd -r -g bugsink bugsink \
RUN groupadd --gid 14237 bugsink \
&& useradd --uid 14237 --gid bugsink \
&& mkdir -p /data \
&& chown -R bugsink:bugsink /data