Skip to content

Commit

Permalink
build: copy in copy-node-modules.sh for npm post-install hook
Browse files Browse the repository at this point in the history
This post-install hook replaces `openedx-assets npm`.

Part of: openedx/edx-platform#31604
  • Loading branch information
kdmccormick committed Jul 17, 2023
1 parent b3ef12c commit 4f1e001
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tutor/templates/build/openedx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ RUN nodeenv /openedx/nodeenv --node=16.14.0 --prebuilt
# Install nodejs requirements
ARG NPM_REGISTRY={{ NPM_REGISTRY }}
WORKDIR /openedx/edx-platform
RUN mkdir -p scripts
COPY --from=edx-platform scripts/copy-node-modules.sh scripts
RUN {% if is_buildkit_enabled() %}--mount=type=bind,from=edx-platform,source=/package.json,target=/openedx/edx-platform/package.json \
--mount=type=bind,from=edx-platform,source=/package-lock.json,target=/openedx/edx-platform/package-lock.json \
--mount=type=cache,target=/root/.npm,sharing=shared {% endif %}npm clean-install --no-audit --registry=$NPM_REGISTRY
Expand Down Expand Up @@ -205,7 +207,6 @@ ENV NO_PREREQ_INSTALL 1
# For instance, we don't want to run all steps of asset collection every time the theme
# is modified.
RUN openedx-assets xmodule \
&& openedx-assets npm \
&& openedx-assets webpack --env=prod \
&& openedx-assets common
COPY --chown=app:app ./themes/ /openedx/themes/
Expand Down

0 comments on commit 4f1e001

Please sign in to comment.