Skip to content

Commit e5b8ba2

Browse files
committed
Merge branch 'hardillb-beta' into dev
2 parents f6598b4 + 16dee4b commit e5b8ba2

File tree

9 files changed

+95
-76
lines changed

9 files changed

+95
-76
lines changed

.docker/Dockerfile.alpine

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
<<<<<<< HEAD
12
ARG ARCH=amd64
23
ARG NODE_VERSION=14
4+
=======
5+
ARG NODE_VERSION=12
6+
>>>>>>> aa66343d764cc4f200ec7fbef0f01afeb1d82d5c
37
ARG OS=alpine
48

59
#### Stage BASE ########################################################################################################
6-
FROM ${ARCH}/node:${NODE_VERSION}-${OS} AS base
10+
FROM node:${NODE_VERSION}-${OS} AS base
711
ARG QEMU_ARCH
812

913
# Copy scripts
@@ -34,7 +38,11 @@ RUN set -ex && \
3438
WORKDIR /usr/src/node-red
3539

3640
# Setup SSH known_hosts file
41+
<<<<<<< HEAD
3742
COPY known_hosts.sh .
43+
=======
44+
COPY .docker/known_hosts.sh .
45+
>>>>>>> aa66343d764cc4f200ec7fbef0f01afeb1d82d5c
3846
RUN ./known_hosts.sh /etc/ssh/ssh_known_hosts && rm /usr/src/node-red/known_hosts.sh
3947

4048
# package.json contains Node-RED NPM module and node dependencies
@@ -85,6 +93,7 @@ USER node-red
8593
# Env variables
8694
ENV NODE_RED_VERSION=$NODE_RED_VERSION \
8795
NODE_PATH=/usr/src/node-red/node_modules:/data/node_modules \
96+
PATH=/usr/src/node-red/node_modules/.bin:${PATH} \
8897
FLOWS=flows.json
8998

9099
# ENV NODE_RED_ENABLE_SAFE_MODE=true # Uncomment to enable safe start mode (flows not running)

.docker/known_hosts.sh

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

.github/workflows/main.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ jobs:
7373
VERSION=${TRAVIS_TAG:1}
7474
if [ "${{ matrix.node }}" == "${{ env.LATEST_NODE }}" ] && [ "${{ matrix.suffix}}" == "" ]; then
7575
TAGS="$TAGS,$IMAGE:$VERSION,$IMAGE:latest"
76+
elif [ "${{ matrix.node }}" == "${{ env.LATEST_NODE }}" ] && [ "${{ matrix.suffix}}" == "-minimal" ]; then
77+
TAGS="$TAGS,$IMAGE:$VERSION,$IMAGE:latest-minimal"
78+
fi
79+
TAGS="$TAGS,$IMAGE:latest-${{ matrix.node }}"
80+
if [ "${{ matrix.suffix}}" == "-minimal" ]; then
81+
TAGS="$TAGS,$IMAGE:latest-${{ matrix.node }}${{ matrix.suffix }}"
7682
fi
7783
else
7884
IMAGE=${{ env.DEV_IMAGE }}
@@ -107,7 +113,7 @@ jobs:
107113
continue-on-error: true
108114
with:
109115
context: .
110-
platforms: linux/amd64, linux/arm64, linux/s390x, linux/arm/v7
116+
platforms: linux/amd64, linux/arm64, linux/s390x, linux/arm/v7, linux/arm/v6
111117
push: ${{ steps.nrVersion.outputs.push }}
112118
file: .docker/Dockerfile.alpine
113119
build-args: |
@@ -140,4 +146,4 @@ jobs:
140146
# else
141147
# echo "Not signing $TAG"
142148
# fi
143-
# done
149+
# done

README.md

Lines changed: 66 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,26 @@ Let's dissect that command:
2424
-p 1880:1880 - connect local port 1880 to the exposed internal port 1880
2525
-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
2626
--name mynodered - give this machine a friendly local name
27-
nodered/node-red - the image to base it on - currently Node-RED v1.3.5
27+
nodered/node-red - the image to base it on - currently Node-RED v2.0.6
2828

2929

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

3232
Welcome to Node-RED
3333
===================
3434

35-
17 May 12:57:10 - [info] Node-RED version: v1.3.5
36-
17 May 12:57:10 - [info] Node.js version: v14.17.0
37-
17 May 12:57:10 - [info] Linux 4.19.76-linuxkit x64 LE
38-
17 May 12:57:11 - [info] Loading palette nodes
39-
17 May 12:57:16 - [info] Settings file : /data/settings.js
40-
17 May 12:57:16 - [info] Context store : 'default' [module=memory]
41-
17 May 12:57:16 - [info] User directory : /data
42-
17 May 12:57:16 - [warn] Projects disabled : editorTheme.projects.enabled=false
43-
17 May 12:57:16 - [info] Flows file : /data/flows.json
44-
17 May 12:57:16 - [info] Creating new flow file
45-
17 May 12:57:17 - [warn]
35+
36+
10 Oct 12:57:10 - [info] Node-RED version: v2.0.6
37+
10 Oct 12:57:10 - [info] Node.js version: v12.22.2
38+
10 Oct 12:57:10 - [info] Linux 4.19.76-linuxkit x64 LE
39+
10 Oct 12:57:11 - [info] Loading palette nodes
40+
10 Oct 12:57:16 - [info] Settings file : /data/settings.js
41+
10 Oct 12:57:16 - [info] Context store : 'default' [module=memory]
42+
10 Oct 12:57:16 - [info] User directory : /data
43+
10 Oct 12:57:16 - [warn] Projects disabled : editorTheme.projects.enabled=false
44+
10 Oct 12:57:16 - [info] Flows file : /data/flows.json
45+
10 Oct 12:57:16 - [info] Creating new flow file
46+
10 Oct 12:57:17 - [warn]
4647

4748
---------------------------------------------------------------------
4849
Your flow credentials file is encrypted using a system-generated key.
@@ -106,42 +107,41 @@ docker run -it -p 1880:1880 -v node_red_data:/data --name mynodered nodered/node
106107
```
107108

108109
The Node-RED images are based on [official Node JS Alpine Linux](https://hub.docker.com/_/node/) images to keep them as small as possible.
109-
Using Alpine Linux reduces the built image size, but removes standard dependencies that are required for native module compilation. If you want to add dependencies with native dependencies, extend the Node-RED image with the missing packages on running containers or build new images see [docker-custom](docker-custom/README.md).
110+
Using Alpine Linux reduces the built image size, but removes standard dependencies that are required for native module compilation. If you want to add dependencies with native dependencies, extend the Node-RED image with the missing packages on running containers or build new images see [docker-custom](docker-custom/README.md) and the documentation on the Node-RED site [here](https://nodered.org/docs/getting-started/docker-custom).
110111

111112
The following table shows the variety of provided Node-RED images.
112113

113114
| **Tag** |**Node**| **Arch** | **Python** |**Dev**| **Base Image** |
114115
|----------------------------|--------|----------|------------|-------|------------------------|
115-
| 1.3.5-10-amd64 | 10 | amd64 | 2.x 3.x | yes | amd64/node:10-alpine |
116-
| 1.3.5-10-arm32v6 | 10 | arm32v6 | 2.x 3.x | yes | arm32v6/node:10-alpine |
117-
| 1.3.5-10-arm32v7 | 10 | arm32v7 | 2.x 3.x | yes | arm32v7/node:10-alpine |
118-
| 1.3.5-10-arm64v8 | 10 | arm64v8 | 2.x 3.x | yes | arm64v8/node:10-alpine |
119-
| 1.3.5-10-s390x | 10 | s390x | 2.x 3.x | yes | s390x/node:10-alpine |
120-
| 1.3.5-10-i386 | 10 | i386 | 2.x 3.x | yes | i386/node:10-alpine |
116+
| 2.0.6-12-amd64 | 12 | amd64 | 2.x 3.x | yes | amd64/node:12-alpine |
117+
| 2.0.6-12-arm32v6 | 12 | arm32v6 | 2.x 3.x | yes | arm32v6/node:12-alpine |
118+
| 2.0.6-12-arm32v7 | 12 | arm32v7 | 2.x 3.x | yes | arm32v7/node:12-alpine |
119+
| 2.0.6-12-arm64v8 | 12 | arm64v8 | 2.x 3.x | yes | arm64v8/node:12-alpine |
120+
| 2.0.6-12-s390x | 12 | s390x | 2.x 3.x | yes | s390x/node:12-alpine |
121+
| 2.0.6-12-i386 | 12 | i386 | 2.x 3.x | yes | i386/node:12-alpine |
121122
| | | | | | |
122-
| 1.3.5-10-minimal-amd64 | 10 | amd64 | no | no | amd64/node:10-alpine |
123-
| 1.3.5-10-minimal-arm32v6 | 10 | arm32v6 | no | no | arm32v6/node:10-alpine |
124-
| 1.3.5-10-minimal-arm32v7 | 10 | arm32v7 | no | no | arm32v7/node:10-alpine |
125-
| 1.3.5-10-minimal-arm64v8 | 10 | arm64v8 | no | no | arm64v8/node:10-alpine |
126-
| 1.3.5-10-minimal-s390x | 10 | s390x | no | no | s390x/node:10-alpine |
127-
| 1.3.5-10-minimal-i386 | 10 | i386 | no | no | i386/node:10-alpine |
128-
123+
| 2.0.6-12-minimal-amd64 | 12 | amd64 | no | no | amd64/node:12-alpine |
124+
| 2.0.6-12-minimal-arm32v6 | 12 | arm32v6 | no | no | arm32v6/node:12-alpine |
125+
| 2.0.6-12-minimal-arm32v7 | 12 | arm32v7 | no | no | arm32v7/node:12-alpine |
126+
| 2.0.6-12-minimal-arm64v8 | 12 | arm64v8 | no | no | arm64v8/node:12-alpine |
127+
| 2.0.6-12-minimal-s390x | 12 | s390x | no | no | s390x/node:12-alpine |
128+
| 2.0.6-12-minimal-i386 | 12 | i386 | no | no | i386/node:12-alpine |
129129

130130
| **Tag** |**Node**| **Arch** | **Python** |**Dev**| **Base Image** |
131131
|----------------------------|--------|----------|------------|-------|------------------------|
132-
| 1.3.5-12-amd64 | 12 | amd64 | 2.x 3.x | yes | amd64/node:12-alpine |
133-
| 1.3.5-12-arm32v6 | 12 | arm32v6 | 2.x 3.x | yes | arm32v6/node:12-alpine |
134-
| 1.3.5-12-arm32v7 | 12 | arm32v7 | 2.x 3.x | yes | arm32v7/node:12-alpine |
135-
| 1.3.5-12-arm64v8 | 12 | arm64v8 | 2.x 3.x | yes | arm64v8/node:12-alpine |
136-
| 1.3.5-12-s390x | 12 | s390x | 2.x 3.x | yes | s390x/node:12-alpine |
137-
| 1.3.5-12-i386 | 12 | i386 | 2.x 3.x | yes | i386/node:12-alpine |
132+
| 2.0.6-14-amd64 | 14 | amd64 | 2.x 3.x | yes | amd64/node:14-alpine |
133+
| 2.0.6-14-arm32v6 | 14 | arm32v6 | 2.x 3.x | yes | arm32v6/node:14-alpine |
134+
| 2.0.6-14-arm32v7 | 14 | arm32v7 | 2.x 3.x | yes | arm32v7/node:14-alpine |
135+
| 2.0.6-14-arm64v8 | 14 | arm64v8 | 2.x 3.x | yes | arm64v8/node:14-alpine |
136+
| 2.0.6-14-s390x | 14 | s390x | 2.x 3.x | yes | s390x/node:14-alpine |
137+
| 2.0.6-14-i386 | 14 | i386 | 2.x 3.x | yes | i386/node:14-alpine |
138138
| | | | | | |
139-
| 1.3.5-12-minimal-amd64 | 12 | amd64 | no | no | amd64/node:12-alpine |
140-
| 1.3.5-12-minimal-arm32v6 | 12 | arm32v6 | no | no | arm32v6/node:12-alpine |
141-
| 1.3.5-12-minimal-arm32v7 | 12 | arm32v7 | no | no | arm32v7/node:12-alpine |
142-
| 1.3.5-12-minimal-arm64v8 | 12 | arm64v8 | no | no | arm64v8/node:12-alpine |
143-
| 1.3.5-12-minimal-s390x | 12 | s390x | no | no | s390x/node:12-alpine |
144-
| 1.3.5-12-minimal-i386 | 12 | i386 | no | no | i386/node:12-alpine |
139+
| 2.0.6-14-minimal-amd64 | 14 | amd64 | no | no | amd64/node:14-alpine |
140+
| 2.0.6-14-minimal-arm32v6 | 14 | arm32v6 | no | no | arm32v6/node:14-alpine |
141+
| 2.0.6-14-minimal-arm32v7 | 14 | arm32v7 | no | no | arm32v7/node:14-alpine |
142+
| 2.0.6-14-minimal-arm64v8 | 14 | arm64v8 | no | no | arm64v8/node:14-alpine |
143+
| 2.0.6-14-minimal-s390x | 14 | s390x | no | no | s390x/node:14-alpine |
144+
| 2.0.6-14-minimal-i386 | 14 | i386 | no | no | i386/node:14-alpine |
145145

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

@@ -150,53 +150,53 @@ The following table shows the provided Manifest Lists.
150150

151151
| **Tag** | **Node-RED Base Image** |
152152
|----------------------------------------|--------------------------------------------|
153-
| latest, 1.3.5, | nodered/node-red:1.3.5-10-amd64 |
154-
| latest-10, 1.3.5-10 | nodered/node-red:1.3.5-10-arm32v6 |
155-
| | nodered/node-red:1.3.5-10-arm32v7 |
156-
| | nodered/node-red:1.3.5-10-arm64v8 |
157-
| | nodered/node-red:1.3.5-10-s390x |
158-
| | nodered/node-red:1.3.5-10-i386 |
153+
| latest, 2.0.6, | nodered/node-red:2.0.6-12-amd64 |
154+
| latest-10, 2.0.6-12 | nodered/node-red:2.0.6-12-arm32v6 |
155+
| | nodered/node-red:2.0.6-12-arm32v7 |
156+
| | nodered/node-red:2.0.6-12-arm64v8 |
157+
| | nodered/node-red:2.0.6-12-s390x |
158+
| | nodered/node-red:2.0.6-12-i386 |
159159
| | |
160-
| latest-minimal, 1.3.5-minimal, | nodered/node-red:1.3.5-10-amd64-minimal |
161-
| latest-10-minimal, 1.3.5-10-minimal | nodered/node-red:1.3.5-10-arm32v6-minimal |
162-
| | nodered/node-red:1.3.5-10-arm32v7-minimal |
163-
| | nodered/node-red:1.3.5-10-arm64v8-minimal |
164-
| | nodered/node-red:1.3.5-10-s390x-minimal |
165-
| | nodered/node-red:1.3.5-10-i386-minimal |
160+
| latest-minimal, 2.0.6-minimal, | nodered/node-red:2.0.6-12-amd64-minimal |
161+
| latest-10-minimal, 2.0.6-12-minimal | nodered/node-red:2.0.6-12-arm32v6-minimal |
162+
| | nodered/node-red:2.0.6-12-arm32v7-minimal |
163+
| | nodered/node-red:2.0.6-12-arm64v8-minimal |
164+
| | nodered/node-red:2.0.6-12-s390x-minimal |
165+
| | nodered/node-red:2.0.6-12-i386-minimal |
166166

167167
| **Tag** | **Node-RED Base Image** |
168168
|----------------------------------------|--------------------------------------------|
169-
| latest-12, 1.3.5-12 | nodered/node-red:1.3.5-12-amd64 |
170-
| | nodered/node-red:1.3.5-12-arm32v6 |
171-
| | nodered/node-red:1.3.5-12-arm32v7 |
172-
| | nodered/node-red:1.3.5-12-arm64v8 |
173-
| | nodered/node-red:1.3.5-12-s390x |
174-
| | nodered/node-red:1.3.5-12-i386 |
169+
| latest-12, 2.0.6-12 | nodered/node-red:2.0.6-14-amd64 |
170+
| | nodered/node-red:2.0.6-14-arm32v6 |
171+
| | nodered/node-red:2.0.6-14-arm32v7 |
172+
| | nodered/node-red:2.0.6-14-arm64v8 |
173+
| | nodered/node-red:2.0.6-14-s390x |
174+
| | nodered/node-red:2.0.6-14-i386 |
175175
| | |
176-
| latest-12-minimal, 1.3.5-12-minimal | nodered/node-red:1.3.5-12-amd64-minimal |
177-
| | nodered/node-red:1.3.5-12-arm32v6-minimal |
178-
| | nodered/node-red:1.3.5-12-arm32v7-minimal |
179-
| | nodered/node-red:1.3.5-12-arm64v8-minimal |
180-
| | nodered/node-red:1.3.5-12-s390x-minimal |
181-
| | nodered/node-red:1.3.5-12-i386-minimal |
176+
| latest-12-minimal, 2.0.6-12-minimal | nodered/node-red:2.0.6-14-amd64-minimal |
177+
| | nodered/node-red:2.0.6-14-arm32v6-minimal |
178+
| | nodered/node-red:2.0.6-14-arm32v7-minimal |
179+
| | nodered/node-red:2.0.6-14-arm64v8-minimal |
180+
| | nodered/node-red:2.0.6-14-s390x-minimal |
181+
| | nodered/node-red:2.0.6-14-i386-minimal |
182182

183183
With the support of Docker manifest list, there is no need to explicitly add the tag for the architecture to use.
184184
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.
185185

186186
Therefore all tags regarding Raspberry PI's are dropped.
187187

188-
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 `1.3.5-10-arm32v7`), and run the container.
188+
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 `2.0.6-13-arm32v7`), and run the container.
189189
```
190190
docker run -it -p 1880:1880 -v node_red_data:/data --name mynodered nodered/node-red:latest
191191
```
192192

193-
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 (`1.3.5-10-amd64`).
193+
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 (`2.0.6-13-amd64`).
194194

195195
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.
196196

197197
**Note**: Currently there is a bug in Docker's architecture detection that fails for `arm32v6` - eg Raspberry Pi Zero or 1. For these devices you currently need to specify the full image tag, for example:
198198
```
199-
docker run -it -p 1880:1880 -v node_red_data:/data --name mynodered nodered/node-red:1.3.5-10-minimal-arm32v6
199+
docker run -it -p 1880:1880 -v node_red_data:/data --name mynodered nodered/node-red:2.0.6-13-minimal-arm32v6
200200
201201
```
202202

@@ -330,7 +330,7 @@ Docker build process, the dependencies are installed under `/usr/src/node-red`.
330330
The main sections to modify are
331331

332332
"dependencies": {
333-
"node-red": "^1.3.5", <-- set the version of Node-RED here
333+
"node-red": "^2.0.6", <-- set the version of Node-RED here
334334
"node-red-dashboard": "*" <-- add any extra npm packages here
335335
},
336336

docker-custom/Dockerfile.custom

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ USER node-red
8282
# Env variables
8383
ENV NODE_RED_VERSION=$NODE_RED_VERSION \
8484
NODE_PATH=/usr/src/node-red/node_modules:/data/node_modules \
85+
PATH=/usr/src/node-red/node_modules/.bin:${PATH} \
8586
FLOWS=flows.json
8687

8788
# ENV NODE_RED_ENABLE_SAFE_MODE=true # Uncomment to enable safe start mode (flows not running)

docker-custom/Dockerfile.debian

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ USER node-red
8383
# Env variables
8484
ENV NODE_RED_VERSION=$NODE_RED_VERSION \
8585
NODE_PATH=/usr/src/node-red/node_modules:/data/node_modules \
86+
PATH=/usr/src/node-red/node_modules/.bin:${PATH} \
8687
FLOWS=flows.json
8788

8889
# ENV NODE_RED_ENABLE_SAFE_MODE=true # Uncomment to enable safe start mode (flows not running)

docker-custom/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,5 @@ $ docker inspect testing:node-red-build
7171

7272
## 5. **Advanced Configuration**
7373

74-
The relevant `Dockerfile` can be modified as required.
74+
The relevant `Dockerfile` can be modified as required. Examples of how to extend `Dockerfiles` to add prerequisite libraries can be found [here](https://nodered.org/docs/getting-started/docker-custom).
75+

docker-custom/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-red-docker",
3-
"version": "2.0.0-beta.1",
3+
"version": "2.1.0-beta.1",
44
"description": "Low-code programming for event-driven applications",
55
"homepage": "http://nodered.org",
66
"license": "Apache-2.0",
@@ -29,7 +29,7 @@
2929
}
3030
],
3131
"dependencies": {
32-
"node-red": "2.0.0-beta.1"
32+
"node-red": "2.1.0-beta.1"
3333
},
3434
"engines": {
3535
"node": ">=12"

0 commit comments

Comments
 (0)