From 2b34992b23cabff8f3fb4fe9c365238d515f9ac1 Mon Sep 17 00:00:00 2001 From: Michael Sheinberg Date: Mon, 6 May 2019 12:57:38 -0700 Subject: [PATCH] Work-around for npm perm error in CI/CD system Started hitting this issue https://github.com/npm/uid-number/issues/3. Seems to be related to how this different CI system is building the container. Docs for this option can be found: https://docs.npmjs.com/misc/config. I don't see any security risks here since we are docker multi-container building and yanking out files from the initial node build. --- docker/1-prod-node | 2 +- docker/ProdDjangoDockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/1-prod-node b/docker/1-prod-node index 82a4108a..651b35d8 100644 --- a/docker/1-prod-node +++ b/docker/1-prod-node @@ -9,7 +9,7 @@ RUN apk add --no-cache paxctl python make g++ RUN paxctl -cm /usr/local/bin/node # Install gulp globally so it can be used during builds -RUN npm install --global gulp-cli +RUN NPM_CONFIG_UNSAFE_PERM=true npm install --global gulp-cli COPY ./ /src-files RUN cd /src-files && ( npm install && gulp build:production ) diff --git a/docker/ProdDjangoDockerfile b/docker/ProdDjangoDockerfile index 6f9fd441..a10d5a87 100644 --- a/docker/ProdDjangoDockerfile +++ b/docker/ProdDjangoDockerfile @@ -9,7 +9,7 @@ RUN apk add --no-cache paxctl python make g++ RUN paxctl -cm /usr/local/bin/node # Install gulp globally so it can be used during builds -RUN npm install --global gulp-cli +RUN NPM_CONFIG_UNSAFE_PERM=true npm install --global gulp-cli COPY ./ /src-files RUN cd /src-files && ( npm install && gulp build:production )