docker(minor): give user a fixed UID, use --chown flag for docker COPY

This commit is contained in:
Langhammer, Jens 2019-10-10 09:36:28 +02:00
parent c1dae0b599
commit 432176ea2f
2 changed files with 2 additions and 4 deletions

View File

@ -1,9 +1,8 @@
FROM docker.beryju.org/passbook/base:latest FROM docker.beryju.org/passbook/base:latest
COPY ./passbook/ /app/passbook COPY --chown=passbook:passbook ./passbook/ /app/passbook
COPY ./manage.py /app/ COPY ./manage.py /app/
COPY ./docker/uwsgi.ini /app/ COPY ./docker/uwsgi.ini /app/
RUN chown -R passbook: /app
WORKDIR /app/ WORKDIR /app/

View File

@ -15,5 +15,4 @@ RUN apt-get update && \
RUN pipenv lock -r > requirements.txt && \ RUN pipenv lock -r > requirements.txt && \
pipenv --rm && \ pipenv --rm && \
pip install -r requirements.txt --no-cache-dir && \ pip install -r requirements.txt --no-cache-dir && \
adduser --system --no-create-home passbook && \ adduser --system --no-create-home --uid 1000 --group --home /app passbook
chown -R passbook /app