Skip to content

Commit 333c3f9

Browse files
authored
Merge pull request #437 from node-red/dev
Merge dev to master for 4.0 release
2 parents 5ff0e3a + eb89667 commit 333c3f9

File tree

13 files changed

+114
-137
lines changed

13 files changed

+114
-137
lines changed

.docker/Dockerfile.alpine

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG NODE_VERSION=16
1+
ARG NODE_VERSION=20
22
ARG OS=alpine
33

44
#### Stage BASE ########################################################################################################

.docker/Dockerfile.debian

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
ARG NODE_VERSION=16
2-
ARG OS=buster-slim
1+
ARG NODE_VERSION=20
2+
ARG OS=bullseye-slim
33

44
#### Stage BASE ########################################################################################################
55
FROM node:${NODE_VERSION}-${OS} AS base

.docker/healthcheck.js

Lines changed: 0 additions & 34 deletions
This file was deleted.

.docker/healthcheck.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../docker-custom/healthcheck.js

.github/workflows/main.yml

Lines changed: 11 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,21 @@ jobs:
2020
alpine:
2121
env:
2222
# Setting the defaults up front
23-
LATEST_NODE: 16
23+
LATEST_NODE: 20
2424
DEFAULT_IMAGE: nodered/node-red
2525
DEV_IMAGE: nodered/node-red-dev
2626
runs-on: ubuntu-latest
2727

2828
strategy:
2929
matrix:
30-
node: [14, 16, 18]
30+
node: [18, 20, 22]
3131
suffix: ["", "-minimal"]
3232

3333
# Steps represent a sequence of tasks that will be executed as part of the job
3434
steps:
3535
-
3636
name: Checkout
37-
uses: actions/checkout@v3
37+
uses: actions/checkout@v4.1.2
3838
- name: Show Env
3939
run: env
4040
-
@@ -59,7 +59,8 @@ jobs:
5959
uses: docker/setup-buildx-action@v3
6060
- name: Get Date
6161
id: date
62-
run: echo "::set-output name=date::$(date +'%Y-%m-%dT%H:%M:%SZ')"
62+
# run: echo "::set-output name=date::$(date +'%Y-%m-%dT%H:%M:%SZ')"
63+
run: echo "date=$(date +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
6364
- name: Get Node-RED Version
6465
id: nrVersion
6566
run: |
@@ -140,10 +141,9 @@ jobs:
140141
name: Build and push
141142
id: build-push
142143
uses: docker/build-push-action@v5
143-
continue-on-error: true
144144
with:
145145
context: .
146-
platforms: linux/amd64, linux/arm64, linux/arm/v7, linux/arm/v6
146+
platforms: linux/amd64, linux/arm64
147147
push: ${{ steps.nrVersion.outputs.push }}
148148
file: .docker/Dockerfile.alpine
149149
build-args: |
@@ -159,14 +159,14 @@ jobs:
159159
debian:
160160
env:
161161
# Setting the defaults up front
162-
LATEST_NODE: 16
162+
LATEST_NODE: 20
163163
DEFAULT_IMAGE: nodered/node-red
164164
DEV_IMAGE: nodered/node-red-dev
165165
runs-on: ubuntu-latest
166166

167167
steps:
168168
- name: Checkout
169-
uses: actions/checkout@v3
169+
uses: actions/checkout@v4.1.2
170170
- name: Setup QEMU
171171
uses: docker/setup-qemu-action@v3
172172
- name: Setup Docker buildx
@@ -178,7 +178,8 @@ jobs:
178178
password: ${{ secrets.DOCKERHUB_TOKEN }}
179179
- name: Get Date
180180
id: date
181-
run: echo "::set-output name=date::$(date +'%Y-%m-%dT%H:%M:%SZ')"
181+
# run: echo "::set-output name=date::$(date +'%Y-%m-%dT%H:%M:%SZ')"
182+
run : echo "date=$(date +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
182183
- name: Docker Metadata
183184
id: meta
184185
uses: docker/metadata-action@v5
@@ -237,7 +238,7 @@ jobs:
237238
238239
- name: Build and push
239240
id: build-push
240-
uses: docker/build-push-action@v2
241+
uses: docker/build-push-action@v5
241242
with:
242243
context: .
243244
platforms: linux/amd64, linux/arm64, linux/arm/v7
@@ -252,26 +253,4 @@ jobs:
252253
BUILD_VERSION=${{ steps.nrVersion.outputs.buildVersion }}
253254
tags: ${{ steps.nrVersion.outputs.tags }}
254255

255-
# -
256-
# name: Sign Image
257-
# run: |
258-
# echo "Digest ${{ steps.build-push.outputs.digest }}"
259-
# for TAG in $(echo "${{ steps.nrVersion.outputs.tags }}" | sed "s/,/ /g"); do
260-
# if [[ "$TAG" == "${{ env.DEFAULT_IMAGE }}:latest" ]]; then
261-
# export DOCKER_CONTENT_TRUST=1
262-
# SIGNER_KEY_NAME="8b08f4d8315a5d6443a4f59eaab60a49dacbc105c13d25f167cdb5cc9fa8f9ed.key"
263-
# PATH_KEYS=$HOME/.docker/trust/private
264-
# mkdir -p $PATH_KEYS
265-
# cp .docker/$SIGNER_KEY_NAME $PATH_KEYS
266-
# chmod 600 $PATH_KEYS/$SIGNER_KEY_NAME
267-
# export DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE=${{ secrets.DOCKER_SIGNING_PASSWORD }}
268-
# docker trust key load $PATH_KEYS/$SIGNER_KEY_NAME
269-
# # docker trust sign $TAG
270-
# # docker trust inspect --pretty $TAG
271-
# echo "Siging tag $TAG"
272-
# else
273-
# echo "Not signing $TAG"
274-
# fi
275-
# done
276-
277256

README.md

Lines changed: 48 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,18 @@ Let's dissect that command:
2626
-p 1880:1880 - connect local port 1880 to the exposed internal port 1880
2727
-v node_red_data:/data - mount the host node_red_data directory to the container /data directory so any changes made to flows are persisted
2828
--name mynodered - give this machine a friendly local name
29-
nodered/node-red - the image to base it on - currently Node-RED v3.1.11
29+
nodered/node-red - the image to base it on - currently Node-RED v4.0.0
30+
3031

3132

3233
Running that command should give a terminal window with a running instance of Node-RED.
3334

3435
Welcome to Node-RED
3536
===================
3637

37-
10 Oct 12:57:10 - [info] Node-RED version: v3.1.11
38-
10 Oct 12:57:10 - [info] Node.js version: v16.14.1
39-
10 Oct 12:57:10 - [info] Linux 4.19.76-linuxkit x64 LE
38+
10 Oct 12:57:10 - [info] Node-RED version: v4.0.0
39+
10 Oct 12:57:10 - [info] Node.js version: v18.19.0
40+
10 Oct 12:57:10 - [info] Linux 6.6.13-100.fc38.x86_64 x64 LE
4041
10 Oct 12:57:11 - [info] Loading palette nodes
4142
10 Oct 12:57:16 - [info] Settings file : /data/settings.js
4243
10 Oct 12:57:16 - [info] Context store : 'default' [module=memory]
@@ -60,7 +61,7 @@ Running that command should give a terminal window with a running instance of No
6061

6162
10 Oct 12:57:17 - [info] Starting flows
6263
10 Oct 12:57:17 - [info] Started flows
63-
10 Oct 12:57:17 - [info] Server now running at http://127.0.0.1:1880/
64+
10 Oct 12:57:17 - [info] Server now running at http://localhost:1880/
6465

6566
[...]
6667

@@ -114,51 +115,43 @@ The following table shows the variety of provided Node-RED images.
114115

115116
| **Tag** |**Node**| **Arch** | **Python** |**Dev**| **Base Image** |
116117
|----------------------------|--------|----------|------------|-------|----------------------------|
117-
| 3.1.11-14 | 14 | amd64 | 2.x 3.x | yes | amd64/node:14-alpine |
118-
| | 14 | arm32v6 | 2.x 3.x | yes | arm32v6/node:14-alpine |
119-
| | 14 | arm32v7 | 2.x 3.x | yes | arm32v7/node:14-alpine |
120-
| | 14 | arm64v8 | 2.x 3.x | yes | arm64v8/node:14-alpine |
121-
| | 14 | s390x | 2.x 3.x | yes | s390x/node:14-alpine |
122-
| | 14 | i386 | 2.x 3.x | yes | i386/node:14-alpine |
118+
| 4.0.0-18 | 18 | amd64 | 3.x | yes | amd64/node:18-alpine |
119+
| | 18 | arm32v7 | 3.x | yes | arm32v7/node:18-alpine |
120+
| | 18 | arm64v8 | 3.x | yes | arm64v8/node:18-alpine |
121+
| | 18 | i386 | 3.x | yes | i386/node:18-alpine |
123122
| | | | | | |
124-
| 3.1.11-14-minimal | 14 | amd64 | no | no | amd64/node:14-alpine |
125-
| | 14 | arm32v6 | no | no | arm32v6/node:14-alpine |
126-
| | 14 | arm32v7 | no | no | arm32v7/node:14-alpine |
127-
| | 14 | arm64v8 | no | no | arm64v8/node:14-alpine |
128-
| | 14 | s390x | no | no | s390x/node:14-alpine |
129-
| | 14 | i386 | no | no | i386/node:14-alpine |
123+
| 4.0.0-18-minimal | 18 | amd64 | no | no | amd64/node:18-alpine |
124+
| | 18 | arm32v7 | no | no | arm32v7/node:18-alpine |
125+
| | 18 | arm64v8 | no | no | arm64v8/node:18-alpine |
126+
| | 18 | i386 | no | no | i386/node:18-alpine |
130127

131128
| **Tag** |**Node**| **Arch** | **Python** |**Dev**| **Base Image** |
132129
|----------------------------|--------|----------|------------|-------|----------------------------|
133-
| 3.1.11-16 | 16 | amd64 | 2.x 3.x | yes | amd64/node:16-alpine |
134-
| | 16 | arm32v6 | 2.x 3.x | yes | arm32v6/node:16-alpine |
135-
| | 16 | arm32v7 | 2.x 3.x | yes | arm32v7/node:16-alpine |
136-
| | 16 | arm64v8 | 2.x 3.x | yes | arm64v8/node:16-alpine |
137-
| | 16 | s390x | 2.x 3.x | yes | s390x/node:16-alpine |
138-
| | 16 | i386 | 2.x 3.x | yes | i386/node:16-alpine |
130+
| 4.0.0-20 | 20 | amd64 | 3.x | yes | amd64/node:20-alpine |
131+
| | 20 | arm32v7 | 3.x | yes | arm32v7/node:20-alpine |
132+
| | 20 | arm64v8 | 3.x | yes | arm64v8/node:20-alpine |
133+
| | 20 | i386 | 3.x | yes | i386/node:20-alpine |
134+
| | | | | | |
135+
| 4.0.0-20-minimal | 20 | amd64 | no | no | amd64/node:20-alpine |
136+
| | 20 | arm32v7 | no | no | arm32v7/node:20-alpine |
137+
| | 20 | arm64v8 | no | no | arm64v8/node:20-alpine |
138+
| | 20 | i386 | no | no | i386/node:20-alpine |
139139
| | | | | | |
140-
| 3.1.11-16-minimal | 16 | amd64 | no | no | amd64/node:16-alpine |
141-
| | 16 | arm32v6 | no | no | arm32v6/node:16-alpine |
142-
| | 16 | arm32v7 | no | no | arm32v7/node:16-alpine |
143-
| | 16 | arm64v8 | no | no | arm64v8/node:16-alpine |
144-
| | 16 | s390x | no | no | s390x/node:16-alpine |
145-
| | 16 | i386 | no | no | i386/node:16-alpine |
140+
| 4.0.0-debian | 20 | amd64 | 3.x | yes | amd64/node:20-buster-slim |
141+
| | 20 | arm32v7 | 3.x | yes | amd64/node:20-buster-slim |
142+
| | 20 | arm64v8 | 3.x | yes | amd64/node:20-buster-slim |
146143

147144
| **Tag** |**Node**| **Arch** | **Python** |**Dev**| **Base Image** |
148145
|----------------------------|--------|----------|------------|-------|----------------------------|
149-
| 3.1.11-18 | 18 | amd64 | 2.x 3.x | yes | amd64/node:18-alpine |
150-
| | 18 | arm32v6 | 2.x 3.x | yes | arm32v6/node:18-alpine |
151-
| | 18 | arm32v7 | 2.x 3.x | yes | arm32v7/node:18-alpine |
152-
| | 18 | arm64v8 | 2.x 3.x | yes | arm64v8/node:18-alpine |
153-
| | 18 | s390x | 2.x 3.x | yes | s390x/node:18-alpine |
154-
| | 18 | i386 | 2.x 3.x | yes | i386/node:18-alpine |
146+
| 4.0.0-22 | 22 | amd64 | 3.x | yes | amd64/node:22-alpine |
147+
| | 22 | arm32v7 | 3.x | yes | arm32v7/node:22-alpine |
148+
| | 22 | arm64v8 | 3.x | yes | arm64v8/node:22-alpine |
149+
| | 22 | i386 | 3.x | yes | i386/node:22-alpine |
155150
| | | | | | |
156-
| 3.1.11-18-minimal | 18 | amd64 | no | no | amd64/node:18-alpine |
157-
| | 18 | arm32v6 | no | no | arm32v6/node:18-alpine |
158-
| | 18 | arm32v7 | no | no | arm32v7/node:18-alpine |
159-
| | 18 | arm64v8 | no | no | arm64v8/node:18-alpine |
160-
| | 18 | s390x | no | no | s390x/node:18-alpine |
161-
| | 18 | i386 | no | no | i386/node:18-alpine |
151+
| 4.0.0-22-minimal | 22 | amd64 | no | no | amd64/node:22-alpine |
152+
| | 22 | arm32v7 | no | no | arm32v7/node:22-alpine |
153+
| | 22 | arm64v8 | no | no | arm64v8/node:22-alpine |
154+
| | 22 | i386 | no | no | i386/node:22-alpine |
162155

163156
- All images have bash, tzdata, nano, curl, git, openssl and openssh-client pre-installed to support Node-RED's Projects feature.
164157

@@ -167,40 +160,42 @@ The following table shows the provided Manifest Lists.
167160

168161
| **Tag** | **Node-RED Base Image** |
169162
|----------------------------------------|--------------------------------------------|
170-
| latest, 3.1.11, | nodered/node-red:3.1.11-16 |
171-
| latest-16, 3.1.11-16 | |
163+
| latest, 4.0.0, | nodered/node-red:4.0.0-20 |
164+
| latest-20, 4.0.0-20 | |
165+
| | |
172166
| | |
167+
| latest-minimal, 4.0.0-minimal, | nodered/node-red:4.0.0-20-minimal |
168+
| latest-20-minimal, 4.0.0-20-minimal | |
173169
| | |
174-
| latest-minimal, 3.1.11-minimal, | nodered/node-red:3.1.11-16-minimal |
175-
| latest-16-minimal, 3.1.11-16-minimal | |
170+
| latest-debian | nodered/node-red:latest-debian |
176171

177172

178173
| **Tag** | **Node-RED Base Image** |
179174
|----------------------------------------|--------------------------------------------|
180-
| latest-14, 3.1.11-14 | nodered/node-red:3.1.11-14 |
175+
| latest-18, 4.0.0-18 | nodered/node-red:4.0.0-18 |
181176
| | |
182-
| latest-14-minimal, 3.1.11-14-minimal | nodered/node-red:3.1.11-14-minimal |
177+
| latest-18-minimal, 4.0.0-18-minimal | nodered/node-red:4.0.0-18-minimal |
178+
183179

184180
| **Tag** | **Node-RED Base Image** |
185181
|----------------------------------------|--------------------------------------------|
186-
| latest-18, 3.1.11-18 | nodered/node-red:3.1.11-18 |
182+
| latest-22, 4.0.0-22 | nodered/node-red:4.0.0-22 |
187183
| | |
188-
| latest-18-minimal, 3.1.11-18-minimal | nodered/node-red:3.1.11-18-minimal
184+
| latest-22-minimal, 4.0.0-22-minimal | nodered/node-red:4.0.0-22-minimal
189185

190186

191187
With the support of Docker manifest list, there is no need to explicitly add the tag for the architecture to use.
192188
When a docker run command or docker service command or docker stack command is executed, docker checks which architecture is required and verifies if it is available in the docker repository. If it does, docker pulls the matching image for it.
193189

194190
Therefore all tags regarding Raspberry PI's are dropped.
195191

196-
For example: suppose you are running on a Raspberry PI 3B, which has `arm32v7` as architecture. Then just run the following command to pull the image (tagged by `3.1.11-16`), and run the container.
192+
For example: suppose you are running on a Raspberry PI 3B, which has `arm32v7` as architecture. Then just run the following command to pull the image (tagged by `4.0.0-20`), and run the container.
193+
197194

198195
```
199196
docker run -it -p 1880:1880 -v node_red_data:/data --name mynodered nodered/node-red:latest
200197
```
201198

202-
The same command can be used for running on an amd64 system, since docker discovers its running on a amd64 host and pulls the image with the matching tag (`3.1.11-16-amd64`).
203-
204199
This gives the advantage that you don't need to know/specify which architecture you are running on and makes docker run commands and docker compose files more flexible and exchangeable across systems.
205200

206201

@@ -334,7 +329,7 @@ Docker build process, the dependencies are installed under `/usr/src/node-red`.
334329
The main sections to modify are
335330

336331
"dependencies": {
337-
"node-red": "^3.1.11", <-- set the version of Node-RED here
332+
"node-red": "^4.0.0", <-- set the version of Node-RED here
338333
"node-red-dashboard": "*" <-- add any extra npm packages here
339334
},
340335

docker-custom/Dockerfile.custom

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
ARG ARCH=amd64
2-
ARG NODE_VERSION=16
2+
ARG NODE_VERSION=20
33
ARG OS=alpine
44

55
#### Stage BASE ########################################################################################################
66
FROM ${ARCH}/node:${NODE_VERSION}-${OS} AS base
77

88
# Copy scripts
99
COPY scripts/*.sh /tmp/
10+
COPY healthcheck.js /
1011

1112
# Install tools, create Node-RED app and data dir, add user and set rights
1213
RUN set -ex && \
@@ -96,7 +97,7 @@ ENV NODE_RED_VERSION=$NODE_RED_VERSION \
9697
EXPOSE 1880
9798

9899
# Add a healthcheck (default every 30 secs)
99-
# HEALTHCHECK CMD curl http://localhost:1880/ || exit 1
100+
HEALTHCHECK CMD node /healthcheck.js
100101

101102
# ENTRYPOINT ["npm", "start", "--cache", "/data/.npm", "--", "--userDir", "/data"]
102103
ENTRYPOINT ["./entrypoint.sh"]

docker-custom/Dockerfile.debian

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
ARG ARCH=amd64
2-
ARG NODE_VERSION=16
3-
ARG OS=buster-slim
2+
ARG NODE_VERSION=20
3+
ARG OS=bullseye-slim
44

55
#### Stage BASE ########################################################################################################
66
FROM ${ARCH}/node:${NODE_VERSION}-${OS} AS base
77

88
# Copy scripts
99
COPY scripts/*.sh /tmp/
10+
COPY healthcheck.js /
1011

1112
# Install tools, create Node-RED app and data dir, add user and set rights
1213
RUN set -ex && \
@@ -97,6 +98,6 @@ ENV NODE_RED_VERSION=$NODE_RED_VERSION \
9798
EXPOSE 1880
9899

99100
# Add a healthcheck (default every 30 secs)
100-
# HEALTHCHECK CMD curl http://localhost:1880/ || exit 1
101+
HEALTHCHECK CMD node /healthcheck.js
101102

102103
ENTRYPOINT ["./entrypoint.sh"]

0 commit comments

Comments
 (0)