Skip to content
Snippets Groups Projects
Verified Commit 166bf4fa authored by Sören Ducati's avatar Sören Ducati
Browse files

changed docker image so it runs as non root user

parent e83161a3
No related branches found
No related tags found
1 merge request!26Drop root privileges in container
......@@ -5,8 +5,7 @@ WORKDIR /app
EXPOSE 5000
# First, copy and install only the requirements...
RUN useradd -ms /bin/bash python
USER python
RUN useradd -ms /bin/bash python && chown -R python:python /app
RUN pip install --upgrade pip setuptools
RUN pip install pipenv
COPY Pipfile.lock .
......@@ -15,7 +14,7 @@ RUN pip uninstall --yes pipenv
RUN pip install -r requirements.txt
# ... then the rest of the application. This allows the installation stage to be cached most of the time
# (so we don't have reinstall of all dependencies every time the container is rebuilt)
COPY . .
COPY --chown=python:python . .
FROM base AS dev
ENV SERVER_TYPE=flask
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment