Skip to content

Commit

Permalink
Support for corepack yarn installation
Browse files Browse the repository at this point in the history
  • Loading branch information
lmakarov committed Apr 19, 2024
1 parent 05484b1 commit 27a4a40
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 15 deletions.
13 changes: 8 additions & 5 deletions 8.1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -327,18 +327,21 @@ $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
export PROFILE="$HOME/.profile"; \
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
Expand Down
13 changes: 8 additions & 5 deletions 8.2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -328,18 +328,21 @@ $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
export PROFILE="$HOME/.profile"; \
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
Expand Down
13 changes: 8 additions & 5 deletions 8.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -337,18 +337,21 @@ $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
export PROFILE="$HOME/.profile"; \
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
Expand Down

0 comments on commit 27a4a40

Please sign in to comment.