From 6546439bf4cf36761077f7e8305edbb4103bf20e Mon Sep 17 00:00:00 2001 From: Luca Date: Tue, 26 Apr 2022 17:28:53 +0200 Subject: [PATCH] Run container as unprivileged user --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index df09d30..4b80b4e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,12 @@ FROM python:3.10-alpine3.15 +RUN adduser -h /opt/shiftregister -D shiftregister + +USER shiftregister WORKDIR /opt/shiftregister +ENV PATH="$PATH:/opt/shiftregister/.local/bin" + RUN pip install --no-cache-dir gunicorn COPY requirements.txt ./