Skip to content

Commit

Permalink
add corepack enable step outside of the BUILD_ALL condition
Browse files Browse the repository at this point in the history
so yarn is directly available even if built with BUILD_ALL=0
  • Loading branch information
NicolasCARPi committed Dec 20, 2023
1 parent 6c91be3 commit 62c358f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,12 @@ ARG BUILD_ALL=1
# install php and js dependencies and build assets
# avoid installing cypress
ENV CYPRESS_INSTALL_BINARY=0
# enable new yarn
RUN corepack enable
# some ini settings are set on the command line to override the restrictive production ones already set
# IMPORTANT: the yarn/build step must be done before the composer/install step because a source file (advancedQuery) will be generated by yarn
# so in order for composer to take it into account, it must exist before we call the install command of composer.
RUN if [ "$BUILD_ALL" = "1" ]; then corepack enable && yarn install \
RUN if [ "$BUILD_ALL" = "1" ]; then yarn install \
&& yarn run buildall:prod \
&& /usr/bin/php81 -d memory_limit=256M -d open_basedir='' /usr/bin/composer install --prefer-dist --no-cache --no-progress --no-dev -a \
&& yarn cache clean && rm -r /root/.cache /root/.yarn; fi
Expand Down

0 comments on commit 62c358f

Please sign in to comment.