canvas-lms/Dockerfile.jenkins.webpack-...

19 lines
820 B
Docker

FROM local/webpack-builder AS webpack-runner
COPY --chown=docker:docker --from=local/cache-helper-collect-webpack /tmp/dst ${APP_HOME}
ARG JS_BUILD_NO_UGLIFY=0
ARG RAILS_LOAD_ALL_LOCALES=0
ARG CRYSTALBALL_MAP=0
RUN bash -c "if [[ "$RAILS_LOAD_ALL_LOCALES" == "0" ]]; then cp -v public/javascripts/translations/_core_en.js public/javascripts/translations/en.js; fi"
RUN COMPILE_ASSETS_API_DOCS=0 \
COMPILE_ASSETS_BRAND_CONFIGS=0 \
COMPILE_ASSETS_NPM_INSTALL=0 \
COMPILE_ASSETS_STYLEGUIDE=0 \
JS_BUILD_NO_UGLIFY="$JS_BUILD_NO_UGLIFY" \
RAILS_LOAD_ALL_LOCALES="$RAILS_LOAD_ALL_LOCALES" \
CRYSTALBALL_MAP="$CRYSTALBALL_MAP" \
bundle exec rails canvas:compile_assets
FROM local/ruby-runner AS webpack-cache
COPY --chown=docker:docker --from=webpack-runner /usr/src/app/public ${APP_HOME}/public