From bdf6d32984489d95dd6cf484a79351f104ac8a9f Mon Sep 17 00:00:00 2001 From: linuxbandit Date: Sat, 5 Aug 2023 11:15:04 +0300 Subject: [PATCH] chore: make USER non-root --- dispatcher/docker/Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dispatcher/docker/Dockerfile b/dispatcher/docker/Dockerfile index 0c94e39b..b5c3de01 100644 --- a/dispatcher/docker/Dockerfile +++ b/dispatcher/docker/Dockerfile @@ -8,9 +8,8 @@ RUN pip install --no-cache-dir -r requirements.txt COPY ./templates /usr/app/templates COPY ./dispatcher/main.py /usr/app/src/main.py -#USER python - -#ENV FOO=BAR +RUN useradd -s /bin/bash python +USER python ENTRYPOINT [ "python", "-u" ] CMD ["main.py"]