From f5dbd5465def50f4c0d07b52897ab213037bdfa7 Mon Sep 17 00:00:00 2001 From: Kyle McCormick Date: Wed, 22 May 2024 09:54:52 -0400 Subject: [PATCH] fix: clean translations before pulling them (#1026) If one is using a bind-mounted edx-platform directory, they may already have pulled translations. This will cause the Docker build to fail with: CommandError: "/openedx/edx-platform/conf/plugins-locale/plugins" should be empty before running atlas pull. To fix this, we simply clean out the edx-platform translation target directories before pulling in the Dockerfile. --- tutor/templates/build/openedx/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/tutor/templates/build/openedx/Dockerfile b/tutor/templates/build/openedx/Dockerfile index e88fb77..368268e 100644 --- a/tutor/templates/build/openedx/Dockerfile +++ b/tutor/templates/build/openedx/Dockerfile @@ -193,6 +193,7 @@ COPY --chown=app:app settings/lms/*.py ./lms/envs/tutor/ COPY --chown=app:app settings/cms/*.py ./cms/envs/tutor/ # Pull latest translations via atlas +RUN make clean_translations RUN ./manage.py lms --settings=tutor.i18n pull_plugin_translations --verbose --repository='{{ ATLAS_REPOSITORY }}' --revision='{{ ATLAS_REVISION }}' {{ ATLAS_OPTIONS }} RUN ./manage.py lms --settings=tutor.i18n pull_xblock_translations --repository='{{ ATLAS_REPOSITORY }}' --revision='{{ ATLAS_REVISION }}' {{ ATLAS_OPTIONS }} RUN atlas pull --repository='{{ ATLAS_REPOSITORY }}' --revision='{{ ATLAS_REVISION }}' {{ ATLAS_OPTIONS }} \