From 62c358f0c89065abe6365fdc36b4bcb74e502ff4 Mon Sep 17 00:00:00 2001 From: Nicolas CARPi Date: Wed, 20 Dec 2023 20:31:52 +0100 Subject: [PATCH] add corepack enable step outside of the BUILD_ALL condition so yarn is directly available even if built with BUILD_ALL=0 --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 44c2556..cccffb6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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