From 8eb89e602d45fe71baef9a64e4ba4e2743747721 Mon Sep 17 00:00:00 2001 From: pedro Date: Wed, 27 Nov 2024 09:28:39 +0100 Subject: [PATCH] dh-django dockerfile: use uid 1000 (app) at least temporarily --- docker/devicehub-django.Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docker/devicehub-django.Dockerfile b/docker/devicehub-django.Dockerfile index a2f81d1..3e0a591 100644 --- a/docker/devicehub-django.Dockerfile +++ b/docker/devicehub-django.Dockerfile @@ -36,4 +36,10 @@ RUN pip install -i https://test.pypi.org/simple/ ereuseapitest==0.0.14 ENV PYTHONPATH="${PYTHONPATH}:/usr/lib/python3/dist-packages" COPY docker/devicehub-django.entrypoint.sh / + +# TODO I don't like this, but the whole ereuse-dpp works with user 1000 because of the volume mapping +# thanks https://stackoverflow.com/questions/70520205/docker-non-root-user-best-practices-for-python-images +RUN adduser --system --no-create-home app +USER app + ENTRYPOINT sh /devicehub-django.entrypoint.sh