Skip to content

Commit

Permalink
Set owner for the source directory in the Dockerfile
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
replaceafill committed Sep 12, 2023
1 parent c997dcc commit 8265c07
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions hack/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

# -----------------------------------------------------------------------------

Expand Down

0 comments on commit 8265c07

Please sign in to comment.