Skip to content

Commit

Permalink
it works!?
Browse files Browse the repository at this point in the history
  • Loading branch information
kdmccormick committed May 31, 2024
1 parent 46b8f65 commit b74e8f4
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions tutor/templates/build/openedx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -146,32 +146,27 @@ FROM nodejs-requirements as pre-assets
# Gather minimal sources for webpacking JS into bundles
# Copy the entire source tree, and then delete everything that isn't relevant.
FROM pre-assets as js-sources
COPY --link --from=edx-platform /lms lms
COPY --link --from=edx-platform /cms cms
COPY --link --from=edx-platform /common common
COPY --link --from=edx-platform /openedx openedx
COPY --link --from=edx-platform /xmodule xmodule
RUN npm run postinstall # Re-copy 'vendor' JS from node_modules into edx-platform source tree
RUN find lms cms common openedx xmodule -type f -a \! \
\( -path '*/static/*' \
COPY --link --from=edx-platform / .
RUN find . -type f -a \! \
\( -path 'node_modules/*' \
-o -path '*/static/*' \
-o -path '*/assets/*' \
-o -path '*/js/*' \
-o -name '*.underscore' \
-o -name '*.json' \
-o -name '*.js' \
-o -name '*.jsx' \
-o -name '.babelrc' \
\) -delete
COPY --link --from=edx-platform /webpack-config webpack-config
COPY --link --from=edx-platform /webpack.builtinblocks.config.js webpack.builtinblocks.config.js
COPY --link --from=edx-platform /webpack.common.config.js webpack.common.config.js

# Intermediate image to capture prod JS build
FROM pre-assets as js-production
COPY --link --from=js-sources /openedx/edx-platform /openedx/edx-platform
COPY --link --from=edx-platform /webpack.prod.config.js webpack.prod.config.js
RUN npm run webpack

# Intermediate image to capture dev JS build
FROM pre-assets as js-development
COPY --link --from=js-sources /openedx/edx-platform /openedx/edx-platform
COPY --link --from=edx-platform /webpack.dev.config.js webpack.dev.config.js
RUN npm run webpack-dev

# Gather minimal requirements and sources for compiling Sass into CSS
Expand Down

0 comments on commit b74e8f4

Please sign in to comment.