Skip to content

Commit

Permalink
fix: install pnpm using npm
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim committed Dec 15, 2023
1 parent 48600e8 commit 14a5411
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
9 changes: 3 additions & 6 deletions Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ ARG PHP_VERSION

FROM php:${PHP_VERSION}-cli

ENV NODE_VERSION=20

LABEL org.opencontainers.image.source https://github.com/FriendsOfShopware/shopware-cli
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/
COPY --from=composer/composer:2-bin /composer /usr/bin/composer
Expand All @@ -21,14 +23,9 @@ RUN curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh |
&& nvm install 20 \
&& nvm alias default 20 \
&& nvm use default \
&& npm config set update-notifier false \
&& npm config set audit false \
&& npm config set fund false \
&& npm config set loglevel warn \
&& nvm cache clear \
&& rm -rf /root/.npm \
&& npm install --global yarn bun \
&& curl -fsSL https://get.pnpm.io/install.sh | SHELL="$(which bash)" sh - \
&& npm install --global yarn bun pnpm \
&& npm cache clean --force

COPY scripts/entrypoint.sh /usr/local/bin/entrypoint.sh
Expand Down
2 changes: 1 addition & 1 deletion extension/asset_platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ func installDependencies(path string) error {
installCmd.Stdout = os.Stdout
installCmd.Stderr = os.Stderr
installCmd.Env = os.Environ()
installCmd.Env = append(installCmd.Env, "PUPPETEER_SKIP_DOWNLOAD=1")
installCmd.Env = append(installCmd.Env, "PUPPETEER_SKIP_DOWNLOAD=1", "npm_config_engine_strict=false", "npm_config_fund=false", "npm_config_audit=false", "npm_config_update_notifier=false")

if err := installCmd.Run(); err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
set -euo pipefail

source /root/.bashrc
nvm use "${NODE_VERSION:-20}" > /dev/null
nvm use "${NODE_VERSION}" > /dev/null

exec "$@"

0 comments on commit 14a5411

Please sign in to comment.