Shrink Docker Image, bump version, docker run as non-root

This commit is contained in:
bohdan-s
2021-12-24 13:12:01 +11:00
parent bdf21001c4
commit 2cddb4d9e8
3 changed files with 27 additions and 4 deletions
+9 -3
View File
@@ -1,4 +1,6 @@
FROM python:3
FROM python:3-slim
RUN useradd sungather
WORKDIR /usr/src/sungather
@@ -6,6 +8,10 @@ COPY requirements.txt ./
RUN pip install --no-cache-dir --upgrade -r requirements.txt
COPY SunGather/ .
RUN touch /config/config.yaml
CMD [ "python", "sungather.py -c /config/config.yaml" ]
VOLUME /config
COPY SunGather/config-example.yaml /config/config.yaml
USER sungather
CMD [ "python", "sungather.py", "-c", "/config/config.yaml" ]