From c3ca6c14d2e210108ca82648b91dad660a815353 Mon Sep 17 00:00:00 2001 From: Brutus5000 Date: Sun, 5 May 2024 18:07:22 +0200 Subject: [PATCH] Dockerfile: Create app folder with non-root permissions --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index ce44f206c..1bc627b97 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,11 +27,11 @@ FROM python:3.10-slim ARG GITHUB_REF ENV VERSION=$GITHUB_REF -COPY --from=builder /code/.venv/lib/ /usr/local/lib/ -COPY --from=builder /code/main.py /code/ - RUN useradd --no-create-home faf +COPY --from=builder /code/.venv/lib/ /usr/local/lib/ +COPY --from=builder --chown=faf:faf /code/main.py /code/ + WORKDIR /code/ USER faf