From fabb36abbba982d404f11fda4bbe0bbedc06be5d Mon Sep 17 00:00:00 2001 From: Dawid Makowski Date: Wed, 20 May 2020 14:58:31 +0800 Subject: [PATCH] Adding support for PNPM more info here https://pnpm.js.org/en/installation --- docker-compose.yml | 1 + env-example | 1 + workspace/Dockerfile | 14 ++++++++++++++ 3 files changed, 16 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 3864bde..71e9623 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -87,6 +87,7 @@ services: - NVM_NODEJS_ORG_MIRROR=${WORKSPACE_NVM_NODEJS_ORG_MIRROR} - INSTALL_NODE=${WORKSPACE_INSTALL_NODE} - NPM_REGISTRY=${WORKSPACE_NPM_REGISTRY} + - INSTALL_PNPM=${WORKSPACE_INSTALL_PNPM} - INSTALL_YARN=${WORKSPACE_INSTALL_YARN} - INSTALL_NPM_GULP=${WORKSPACE_INSTALL_NPM_GULP} - INSTALL_NPM_BOWER=${WORKSPACE_INSTALL_NPM_BOWER} diff --git a/env-example b/env-example index ee6eee4..43c8356 100644 --- a/env-example +++ b/env-example @@ -98,6 +98,7 @@ WORKSPACE_NVM_NODEJS_ORG_MIRROR= WORKSPACE_INSTALL_NODE=true WORKSPACE_NODE_VERSION=node WORKSPACE_NPM_REGISTRY= +WORKSPACE_INSTALL_PNPM=false WORKSPACE_INSTALL_YARN=true WORKSPACE_YARN_VERSION=latest WORKSPACE_INSTALL_NPM_GULP=true diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 0c7d213..c3c5a34 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -723,6 +723,20 @@ RUN if [ ${NPM_REGISTRY} ]; then \ . ~/.bashrc && npm config set registry ${NPM_REGISTRY} \ ;fi + +########################################################################### +# PNPM: +########################################################################### + +USER laradock + +ARG INSTALL_PNPM=false + +RUN if [ ${INSTALL_PNPM} = true ]; then \ + npx pnpm add -g pnpm \ +;fi + + ########################################################################### # YARN: ###########################################################################