From 27a4a401646275af0273a78ad33f5d67609970e9 Mon Sep 17 00:00:00 2001 From: Leonid Makarov Date: Fri, 19 Apr 2024 18:14:33 +0200 Subject: [PATCH] Support for corepack yarn installation --- 8.1/Dockerfile | 13 ++++++++----- 8.2/Dockerfile | 13 ++++++++----- 8.3/Dockerfile | 13 ++++++++----- 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/8.1/Dockerfile b/8.1/Dockerfile index ad623d0c..f8547315 100644 --- a/8.1/Dockerfile +++ b/8.1/Dockerfile @@ -327,8 +327,9 @@ $HOME/.composer/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibil ENV \ NVM_VERSION=0.39.7 \ NODE_VERSION=20.11.0 \ - # yarn releases above 1.22.19 don't install - YARN_VERSION=1.22.19 + # Yarn (Classic v1) + # https://github.com/yarnpkg/yarn/releases + YARN_VERSION=1.22.22 # Don't use -x here, as the output may be excessive RUN set -e; \ # NVM and a defaut Node.js version @@ -336,9 +337,11 @@ RUN set -e; \ curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v${NVM_VERSION}/install.sh | bash >/dev/null; \ # Reload profile to load nvm (needed by Yarn installation below) . $HOME/.profile; \ - # Yarn - export YARN_PROFILE="$HOME/.profile"; \ - curl -fsSL https://yarnpkg.com/install.sh | bash -s -- --version ${YARN_VERSION} >/dev/null + # Yarn (Classic v1) + # Installing via npm to allow fore override with never versions via corepack + npm install -g yarn@${YARN_VERSION}; \ + # Enable corepack (allows installing project level yarn v2+ via yarn) + corepack enable ## Ruby bundler ## Don't use -x here, as the output may be excessive diff --git a/8.2/Dockerfile b/8.2/Dockerfile index 2da32b31..0d32486e 100644 --- a/8.2/Dockerfile +++ b/8.2/Dockerfile @@ -328,8 +328,9 @@ $HOME/.composer/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibil ENV \ NVM_VERSION=0.39.7 \ NODE_VERSION=20.11.0 \ - # yarn releases above 1.22.19 don't install - YARN_VERSION=1.22.19 + # Yarn (Classic v1) + # https://github.com/yarnpkg/yarn/releases + YARN_VERSION=1.22.22 # Don't use -x here, as the output may be excessive RUN set -e; \ # NVM and a defaut Node.js version @@ -337,9 +338,11 @@ RUN set -e; \ curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v${NVM_VERSION}/install.sh | bash >/dev/null; \ # Reload profile to load nvm (needed by Yarn installation below) . $HOME/.profile; \ - # Yarn - export YARN_PROFILE="$HOME/.profile"; \ - curl -fsSL https://yarnpkg.com/install.sh | bash -s -- --version ${YARN_VERSION} >/dev/null + # Yarn (Classic v1) + # Installing via npm to allow fore override with never versions via corepack + npm install -g yarn@${YARN_VERSION}; \ + # Enable corepack (allows installing project level yarn v2+ via yarn) + corepack enable ## Ruby bundler ## Don't use -x here, as the output may be excessive diff --git a/8.3/Dockerfile b/8.3/Dockerfile index 29e25a0c..b6a357c8 100644 --- a/8.3/Dockerfile +++ b/8.3/Dockerfile @@ -337,8 +337,9 @@ $HOME/.composer/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibil ENV \ NVM_VERSION=0.39.7 \ NODE_VERSION=20.11.0 \ - # yarn releases above 1.22.19 don't install - YARN_VERSION=1.22.19 + # Yarn (Classic v1) + # https://github.com/yarnpkg/yarn/releases + YARN_VERSION=1.22.22 # Don't use -x here, as the output may be excessive RUN set -e; \ # NVM and a defaut Node.js version @@ -346,9 +347,11 @@ RUN set -e; \ curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v${NVM_VERSION}/install.sh | bash >/dev/null; \ # Reload profile to load nvm (needed by Yarn installation below) . $HOME/.profile; \ - # Yarn - export YARN_PROFILE="$HOME/.profile"; \ - curl -fsSL https://yarnpkg.com/install.sh | bash -s -- --version ${YARN_VERSION} >/dev/null + # Yarn (Classic v1) + # Installing via npm to allow fore override with never versions via corepack + npm install -g yarn@${YARN_VERSION}; \ + # Enable corepack (allows installing project level yarn v2+ via yarn) + corepack enable ## Ruby bundler ## Don't use -x here, as the output may be excessive