Use UID GID 1001 1001 in container

This commit is contained in:
MiTHRAL 2026-05-13 22:21:13 -04:00
parent fee04724ed
commit 86ea28cceb
2 changed files with 5 additions and 5 deletions

View file

@ -2,9 +2,9 @@ FROM python:3.12-alpine
WORKDIR /app WORKDIR /app
COPY --chown=1001:1000 status_bot.py /app/status_bot.py COPY --chown=1001:1001 status_bot.py /app/status_bot.py
COPY --chown=1001:1000 dashboard.html /app/dashboard.html COPY --chown=1001:1001 dashboard.html /app/dashboard.html
COPY --chown=1001:1000 services.example.json /app/services.json COPY --chown=1001:1001 services.example.json /app/services.json
RUN adduser -D -u 1001 -g "" -h /app archive-status RUN adduser -D -u 1001 -g "" -h /app archive-status

View file

@ -112,10 +112,10 @@ mkdir -p state
chmod 755 state chmod 755 state
``` ```
The container runs as UID `1001` inside the image. If the mounted `services.json` or `state/` were created by another user, fix ownership once: The container runs as `1001:1001` inside the image. If the mounted `services.json` or `state/` were created by another user, fix ownership once:
```sh ```sh
sudo chown -R 1001:1000 services.json state sudo chown -R 1001:1001 services.json state
``` ```
If `state/` or `services.json` were created by a previous container as another user, fix ownership once: If `state/` or `services.json` were created by a previous container as another user, fix ownership once: