From 432176ea2f780c347a6ad3a8b2aeff6b62be7845 Mon Sep 17 00:00:00 2001 From: "Langhammer, Jens" Date: Thu, 10 Oct 2019 09:36:28 +0200 Subject: [PATCH] docker(minor): give user a fixed UID, use --chown flag for docker COPY --- Dockerfile | 3 +-- base.Dockerfile | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6fe1180fd..11ba32e02 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,8 @@ FROM docker.beryju.org/passbook/base:latest -COPY ./passbook/ /app/passbook +COPY --chown=passbook:passbook ./passbook/ /app/passbook COPY ./manage.py /app/ COPY ./docker/uwsgi.ini /app/ -RUN chown -R passbook: /app WORKDIR /app/ diff --git a/base.Dockerfile b/base.Dockerfile index 97a7005d5..5eec1f851 100644 --- a/base.Dockerfile +++ b/base.Dockerfile @@ -15,5 +15,4 @@ RUN apt-get update && \ RUN pipenv lock -r > requirements.txt && \ pipenv --rm && \ pip install -r requirements.txt --no-cache-dir && \ - adduser --system --no-create-home passbook && \ - chown -R passbook /app + adduser --system --no-create-home --uid 1000 --group --home /app passbook