Use UID GID 1001 1001 in container
This commit is contained in:
parent
fee04724ed
commit
86ea28cceb
2 changed files with 5 additions and 5 deletions
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue