From 842715b1d26229d732af04d37eeac02bce4fceb2 Mon Sep 17 00:00:00 2001 From: Alex Toff Date: Wed, 30 Sep 2020 12:09:16 +0100 Subject: [PATCH 1/2] feat: Mount .npmrc into workspace home --- workspace/.npmrc | 0 workspace/Dockerfile | 4 ++++ 2 files changed, 4 insertions(+) create mode 100644 workspace/.npmrc diff --git a/workspace/.npmrc b/workspace/.npmrc new file mode 100644 index 00000000..e69de29b diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 6d059bac..a0f0b0ca 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -734,6 +734,10 @@ RUN if [ ${NPM_REGISTRY} ]; then \ . ~/.bashrc && npm config set registry ${NPM_REGISTRY} \ ;fi +# Mount .npmrc into home folder +COPY ./.npmrc /root/.npmrc +COPY ./.npmrc /home/laradock/.npmrc + ########################################################################### # PNPM: From 42ac60933751d47c6228016c47a8b1e3f2507dd1 Mon Sep 17 00:00:00 2001 From: Alex Toff Date: Wed, 30 Sep 2020 12:19:27 +0100 Subject: [PATCH 2/2] docs: Add note in docs about npmrc --- DOCUMENTATION/content/documentation/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/DOCUMENTATION/content/documentation/index.md b/DOCUMENTATION/content/documentation/index.md index cecfa396..d374714b 100644 --- a/DOCUMENTATION/content/documentation/index.md +++ b/DOCUMENTATION/content/documentation/index.md @@ -1887,6 +1887,7 @@ To install NVM and NodeJS in the Workspace container 3 - Re-build the container `docker-compose build workspace` +A `.npmrc` file is included in the `workspace` folder if you need to utilise this globally. This is copied automatically into the root and laradock user's folders on build.