Skip to content
Snippets Groups Projects
Commit 372ec585 authored by René Schöne's avatar René Schöne
Browse files

on docker, run as new user

parent aea32b90
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,16 @@ FROM python:3.9
COPY requirements.txt /requirements.txt
RUN pip install -r requirements.txt
COPY main.py utils.py cgv_connector_pb2.py /app/
COPY config/ /app/config/
ENV HOME /home/user
RUN useradd --create-home --home-dir $HOME user \
&& chmod -R u+rwx $HOME \
&& chown -R user:user $HOME
RUN mkdir /shared_directory_images && chown user:user /shared_directory_images
USER user
COPY --chown=user:user main.py utils.py cgv_connector_pb2.py /app/
COPY --chown=user:user config/ /app/config/
WORKDIR "/app"
ENTRYPOINT "python" "main.py"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment