From 4dda1ed11d2979ff482b7f0c6a079131ba8e1a8b Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Fri, 20 Mar 2026 16:48:02 +0000 Subject: [PATCH 1/3] Add npm update to all docker files --- file-server/Dockerfile | 1 + flowforge-container/Dockerfile | 1 + node-red-container/Dockerfile | 2 ++ node-red-container/Dockerfile-2.2.x | 2 ++ node-red-container/Dockerfile-3.1 | 2 ++ node-red-container/Dockerfile-4.0 | 2 ++ node-red-container/Dockerfile-4.1 | 2 ++ 7 files changed, 12 insertions(+) diff --git a/file-server/Dockerfile b/file-server/Dockerfile index 55c5b6ca..9442f208 100644 --- a/file-server/Dockerfile +++ b/file-server/Dockerfile @@ -3,6 +3,7 @@ FROM node:20-alpine ARG TAG RUN apk add --no-cache --virtual build-base g++ make py3-pip sqlite-dev python3 +RUN npm install -g npm # RUN npm config set python `which python3` --global WORKDIR /usr/src/flowforge-file-server diff --git a/flowforge-container/Dockerfile b/flowforge-container/Dockerfile index 634da59e..5fe77035 100644 --- a/flowforge-container/Dockerfile +++ b/flowforge-container/Dockerfile @@ -3,6 +3,7 @@ FROM node:20-alpine ARG TAG RUN apk add --no-cache --virtual build-base g++ make py3-pip sqlite-dev python3 git +RUN npm install -g npm # RUN npm config set python `which python3` --global WORKDIR /usr/src/forge diff --git a/node-red-container/Dockerfile b/node-red-container/Dockerfile index 98078d4f..2d170725 100644 --- a/node-red-container/Dockerfile +++ b/node-red-container/Dockerfile @@ -2,6 +2,8 @@ FROM nodered/node-red:3.0.2-16 ARG BUILD_TAG=latest +RUN npm install -g npm + COPY healthcheck.js /healthcheck.js COPY package.json /data diff --git a/node-red-container/Dockerfile-2.2.x b/node-red-container/Dockerfile-2.2.x index dba3c20d..01020f9b 100644 --- a/node-red-container/Dockerfile-2.2.x +++ b/node-red-container/Dockerfile-2.2.x @@ -2,6 +2,8 @@ FROM nodered/node-red:2.2.3-16 ARG BUILD_TAG=latest +RUN npm install -g npm + COPY healthcheck.js /healthcheck.js COPY package.json /data diff --git a/node-red-container/Dockerfile-3.1 b/node-red-container/Dockerfile-3.1 index 6c9fafce..492a0023 100644 --- a/node-red-container/Dockerfile-3.1 +++ b/node-red-container/Dockerfile-3.1 @@ -2,6 +2,8 @@ FROM nodered/node-red:3.1.15-18 ARG BUILD_TAG=latest +RUN npm install -g npm + COPY healthcheck.js /healthcheck.js COPY package.json /data diff --git a/node-red-container/Dockerfile-4.0 b/node-red-container/Dockerfile-4.0 index 36a69f89..c35ea311 100644 --- a/node-red-container/Dockerfile-4.0 +++ b/node-red-container/Dockerfile-4.0 @@ -2,6 +2,8 @@ FROM nodered/node-red:4.0.9-20 ARG BUILD_TAG=latest +RUN npm install -g npm + COPY healthcheck.js /healthcheck.js COPY package.json /data diff --git a/node-red-container/Dockerfile-4.1 b/node-red-container/Dockerfile-4.1 index 4ef7ce54..2d78e706 100644 --- a/node-red-container/Dockerfile-4.1 +++ b/node-red-container/Dockerfile-4.1 @@ -2,6 +2,8 @@ FROM nodered/node-red:4.1.7-22 ARG BUILD_TAG=latest +RUN npm install -g npm + COPY healthcheck.js /healthcheck.js COPY package.json /data From 4e499f1c1474859dc832c120bdfb695b8c0f121e Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Fri, 20 Mar 2026 18:03:09 +0000 Subject: [PATCH 2/3] Fix NR docker files --- node-red-container/Dockerfile-2.2.x | 2 -- node-red-container/Dockerfile-3.1 | 4 ++++ node-red-container/Dockerfile-4.0 | 4 ++++ node-red-container/Dockerfile-4.1 | 4 ++++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/node-red-container/Dockerfile-2.2.x b/node-red-container/Dockerfile-2.2.x index 01020f9b..dba3c20d 100644 --- a/node-red-container/Dockerfile-2.2.x +++ b/node-red-container/Dockerfile-2.2.x @@ -2,8 +2,6 @@ FROM nodered/node-red:2.2.3-16 ARG BUILD_TAG=latest -RUN npm install -g npm - COPY healthcheck.js /healthcheck.js COPY package.json /data diff --git a/node-red-container/Dockerfile-3.1 b/node-red-container/Dockerfile-3.1 index 492a0023..3abbee88 100644 --- a/node-red-container/Dockerfile-3.1 +++ b/node-red-container/Dockerfile-3.1 @@ -2,7 +2,11 @@ FROM nodered/node-red:3.1.15-18 ARG BUILD_TAG=latest +USER root RUN npm install -g npm +RUN chown -R 1000:1000 "/data/.npm" + +USER node-red COPY healthcheck.js /healthcheck.js diff --git a/node-red-container/Dockerfile-4.0 b/node-red-container/Dockerfile-4.0 index c35ea311..8a3a9fd4 100644 --- a/node-red-container/Dockerfile-4.0 +++ b/node-red-container/Dockerfile-4.0 @@ -2,7 +2,11 @@ FROM nodered/node-red:4.0.9-20 ARG BUILD_TAG=latest +USER root RUN npm install -g npm +RUN chown -R 1000:1000 "/data/.npm" + +USER node-red COPY healthcheck.js /healthcheck.js diff --git a/node-red-container/Dockerfile-4.1 b/node-red-container/Dockerfile-4.1 index 2d78e706..ec4dc983 100644 --- a/node-red-container/Dockerfile-4.1 +++ b/node-red-container/Dockerfile-4.1 @@ -2,7 +2,11 @@ FROM nodered/node-red:4.1.7-22 ARG BUILD_TAG=latest +USER root RUN npm install -g npm +RUN chown -R 1000:1000 "/data/.npm" + +USER node-red COPY healthcheck.js /healthcheck.js From 11113f49a33a1c6f3892ba7441d9d2ef32556f00 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Fri, 20 Mar 2026 18:04:39 +0000 Subject: [PATCH 3/3] Remove npm install from 3.0.2 NR Dockerfile --- node-red-container/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/node-red-container/Dockerfile b/node-red-container/Dockerfile index 2d170725..98078d4f 100644 --- a/node-red-container/Dockerfile +++ b/node-red-container/Dockerfile @@ -2,8 +2,6 @@ FROM nodered/node-red:3.0.2-16 ARG BUILD_TAG=latest -RUN npm install -g npm - COPY healthcheck.js /healthcheck.js COPY package.json /data