Skip to content
Snippets Groups Projects

Drop root privileges in container

Merged Sören Ducati requested to merge ducati/portal:drop-root-permissions into master
All threads resolved!
+ 2
1
@@ -5,6 +5,7 @@ WORKDIR /app
EXPOSE 5000
# First, copy and install only the requirements...
RUN useradd -ms /bin/bash python && chown -R python:python /app
RUN pip install --upgrade pip setuptools
RUN pip install pipenv
COPY Pipfile.lock .
@@ -13,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
Loading