From 8265c07cda19a72064450530078ece283c48c611 Mon Sep 17 00:00:00 2001 From: "Douglas Cerna (Soy Douglas)" Date: Tue, 12 Sep 2023 14:21:19 +0000 Subject: [PATCH] Set owner for the source directory in the Dockerfile This sets the archivematica user and group ids as owner of the source directory contents which fixes a permission error raised by the Django compilemessages command when it cannot write *.mo files to the messages directories. --- hack/Dockerfile | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/hack/Dockerfile b/hack/Dockerfile index 9f445ed7ad..719a831803 100644 --- a/hack/Dockerfile +++ b/hack/Dockerfile @@ -94,13 +94,7 @@ RUN set -ex \ && pyenv exec python${PYTHON_VERSION} -m pip install --requirement /src/requirements-dev.txt \ && pyenv rehash -COPY . /src - -# Allow Django's compilemessages to write *.mo files to the messages subdirectories. -USER root -RUN set -ex \ - && find /src/src/dashboard/src/locale -type d -name 'LC_MESSAGES' -exec chown archivematica:archivematica '{}' \; -USER archivematica +COPY --chown=${USER_ID}:${GROUP_ID} . /src # -----------------------------------------------------------------------------