run django as non-root

master
Clemens Klug 2019-12-04 16:10:21 +01:00
parent 9baedb322d
commit a83911a9cf
2 changed files with 4 additions and 2 deletions

View File

@ -2,7 +2,7 @@ version: "2"
services:
web:
image: docker.clkl.de/partdoc/web:0.1
image: docker.clkl.de/partdoc/web:0.2
build: partdoc
env_file: postgres.env
volumes:

View File

@ -3,4 +3,6 @@ FROM alpine:3.7
ADD requirements.txt /
RUN apk add --update --no-cache python3 py3-psycopg2 && \
sed -i 's/psycopg2/#psycopg2/' /requirements.txt && \
pip3 install -r /requirements.txt && rm /requirements.txt
pip3 install -r /requirements.txt && rm /requirements.txt && \
adduser -D django
USER django