Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
333c3f9
Merge pull request #437 from node-red/dev
knolleary Jun 20, 2024
586d4e0
Bump to 4.0.0
knolleary Jun 20, 2024
e3dc55e
Merge pull request #438 from node-red/create-pull-request/patch
knolleary Jun 20, 2024
da1683d
Add ARMv7 back to alpine builds
hardillb Jun 24, 2024
2f9caca
Remove linux/arm/v7
hardillb Jun 24, 2024
74b12c6
Bump to 4.0.1
knolleary Jun 26, 2024
f75a6ee
Merge pull request #441 from node-red/create-pull-request/patch
knolleary Jun 26, 2024
a34bf58
Bump to 4.0.2
knolleary Jul 1, 2024
160e117
Merge pull request #442 from node-red/create-pull-request/patch
knolleary Jul 1, 2024
fd5b69a
Enable 32bit ARM builds for Node v18
hardillb Jul 1, 2024
c7464b8
Fix typo
hardillb Jul 1, 2024
4b83b23
Enable 32bit ARM builds again
hardillb Jul 7, 2024
082ee52
Merge pull request #443 from hardillb/enable-node-18-arm7
knolleary Jul 10, 2024
8d523fe
Add iputils-ping to the base packages (#445)
hardillb Jul 19, 2024
c234a48
Bump to 4.0.3
knolleary Sep 17, 2024
6670112
Merge pull request #451 from node-red/create-pull-request/patch
knolleary Sep 17, 2024
3dee274
Add image source label to dockerfiles (#456)
wuast94 Oct 8, 2024
a25deec
Bump to 4.0.4
knolleary Oct 9, 2024
c19275d
Merge pull request #458 from node-red/create-pull-request/patch
knolleary Oct 9, 2024
33dd10b
Fix case of RELEASE stage (#455)
hardillb Oct 9, 2024
04d23a7
Bump to 4.0.5
knolleary Oct 10, 2024
6e0479a
Merge pull request #463 from node-red/create-pull-request/patch
knolleary Oct 10, 2024
58ee67e
Bump to 4.0.6
knolleary Dec 16, 2024
18baff3
Merge pull request #469 from node-red/create-pull-request/patch
knolleary Dec 16, 2024
ec7202e
Bump to 4.0.7
knolleary Dec 18, 2024
aefdd6e
Merge pull request #473 from node-red/create-pull-request/patch
knolleary Dec 18, 2024
d21116c
Bump to 4.0.8
knolleary Dec 20, 2024
68f37e2
Merge pull request #474 from node-red/create-pull-request/patch
knolleary Dec 20, 2024
87d2adf
Bump to 4.0.9
knolleary Feb 14, 2025
ea1f58b
Merge pull request #477 from node-red/create-pull-request/patch
knolleary Feb 14, 2025
67e7aa6
Change ubuntu version for debian container GH Action build
hardillb Feb 14, 2025
09f20d7
revert to latest as all ubuntu-images appear broken
hardillb Feb 14, 2025
f2250a6
pin qemu image
hardillb Feb 15, 2025
baa2e77
Publish to ghcr.io (#478)
hardillb Mar 17, 2025
d88c262
Add missing GH Repo Env to debian build (#479)
hardillb Mar 17, 2025
4e929c6
Fix sed regex to get all instances
hardillb Mar 17, 2025
7bacb4e
Fix Debian multiple start tags
hardillb Mar 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .docker/Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ RUN apk add --no-cache --virtual buildtools build-base linux-headers udev python
cp -R node_modules prod_node_modules

#### Stage RELEASE #####################################################################################################
FROM base AS RELEASE
FROM base AS release
ARG BUILD_DATE
ARG BUILD_VERSION
ARG BUILD_REF
Expand All @@ -71,6 +71,7 @@ LABEL org.label-schema.build-date=${BUILD_DATE} \
org.label-schema.vcs-ref=${BUILD_REF} \
org.label-schema.vcs-type="Git" \
org.label-schema.vcs-url="https://github.com/node-red/node-red-docker" \
org.opencontainers.image.source="https://github.com/node-red/node-red-docker" \
org.label-schema.arch=${ARCH} \
authors="Dave Conway-Jones, Nick O'Leary, James Thomas, Raymond Mouthaan"

Expand Down
6 changes: 4 additions & 2 deletions .docker/Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ RUN set -ex && \
git \
openssl \
openssh-client \
ca-certificates && \
ca-certificates \
iputils-ping && \
mkdir -p /usr/src/node-red /data && \
deluser --remove-home node && \
# adduser --home /usr/src/node-red --disabled-password --no-create-home node-red --uid 1000 && \
Expand Down Expand Up @@ -52,7 +53,7 @@ RUN apt-get update && apt-get install -y build-essential python && \
cp -R node_modules prod_node_modules

#### Stage RELEASE #####################################################################################################
FROM base AS RELEASE
FROM base AS release
ARG BUILD_DATE
ARG BUILD_VERSION
ARG BUILD_REF
Expand All @@ -70,6 +71,7 @@ LABEL org.label-schema.build-date=${BUILD_DATE} \
org.label-schema.vcs-ref=${BUILD_REF} \
org.label-schema.vcs-type="Git" \
org.label-schema.vcs-url="https://github.com/node-red/node-red-docker" \
org.opencontainers.image.source="https://github.com/node-red/node-red-docker" \
org.label-schema.arch=${ARCH} \
authors="Dave Conway-Jones, Nick O'Leary, James Thomas, Raymond Mouthaan"

Expand Down
89 changes: 80 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@ jobs:
# Setting the defaults up front
LATEST_NODE: 20
DEFAULT_IMAGE: nodered/node-red
GH_IMAGE: ghcr.io/node-red/node-red
DEV_IMAGE: nodered/node-red-dev
GH_DEV_IMAGE: ghcr.io/node-red/node-red-dev
runs-on: ubuntu-latest

strategy:
max-parallel: 2
matrix:
node: [18, 20, 22]
suffix: ["", "-minimal"]
Expand All @@ -47,16 +50,41 @@ jobs:
suffix=-${{matrix.node}}${{matrix.suffix}}
images: |
${{ env.DEFAULT_IMAGE }}
${{ env.GH_IMAGE }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}

-
name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
-
name: Set up SSH key pi5
uses: MrSquaare/ssh-setup-action@2d028b70b5e397cf8314c6eaea229a6c3e34977a # v3.1.0
with:
host: ${{ secrets.SSH_REMOTE_HOST}}
private-key: ${{ secrets.SSH_PRIVATE_KEY }}
private-key-name: remote
port: 2022
-
name: Set up SSH key pi4
uses: MrSquaare/ssh-setup-action@2d028b70b5e397cf8314c6eaea229a6c3e34977a # v3.1.0
with:
host: ${{ secrets.SSH_REMOTE_HOST}}
private-key: ${{ secrets.SSH_PRIVATE_KEY }}
private-key-name: remote
port: 2023
-
name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
with:
append: |
- endpoint: ssh://nr@${{ secrets.SSH_REMOTE_HOST }}:2023
platforms: linux/arm/v6,linux/arm/v7
- endpoint: ssh://nr@${{ secrets.SSH_REMOTE_HOST }}:2022
platforms: linux/arm64
- name: Get Date
id: date
# run: echo "::set-output name=date::$(date +'%Y-%m-%dT%H:%M:%SZ')"
Expand All @@ -83,7 +111,7 @@ jobs:
TEMP=${TEMP:1}
TEMP2=$(echo $GITHUB_REF | awk -F '/' '{ print $3}')
echo "$GITHUB_REF - $TEMP"
TAGS=$(echo $TAGS | sed "s/$TEMP2/$TEMP/")
TAGS=$(echo $TAGS | sed "s/$TEMP2/$TEMP/g")
TRAVIS_TAG=${{ github.event.inputs.version }}
else
TRAVIS_TAG=$(echo $GITHUB_REF | awk -F '/' '{ print $3}')
Expand All @@ -93,32 +121,48 @@ jobs:

if [[ "$TRAVIS_TAG" =~ ^v[0-9\.-]*$ ]]; then
IMAGE=${{ env.DEFAULT_IMAGE }}
GH_IMAGE=${{ env.GH_IMAGE}}
PUSH=true
VERSION=${TRAVIS_TAG:1}
STABLE_VERSION=`echo ${VERSION} | sed -r 's/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)$/\1.\2/'`

if [[ "${{ matrix.node }}" == "${{ env.LATEST_NODE }}" && "${{ matrix.suffix }}" == "" ]]; then
TAGS="$TAGS,$IMAGE:$VERSION,$IMAGE:$STABLE_VERSION,$IMAGE:latest"
TAGS="$TAGS,$IMAGE:$VERSION,$IMAGE:$STABLE_VERSION,$IMAGE:latest,$GH_IMAGE:$VERSION,$GH_IMAGE:$STABLE_VERSION,$GH_IMAGE:latest"
elif [[ "${{ matrix.node }}" == "${{ env.LATEST_NODE }}" && "${{ matrix.suffix }}" == "-minimal" ]]; then
TAGS="$TAGS,$IMAGE:$VERSION-minimal,$IMAGE:latest-minimal"
TAGS="$TAGS,$IMAGE:$VERSION-minimal,$IMAGE:latest-minimal,$GH_IMAGE:$VERSION-minimal,$GH_IMAGE:latest-minimal"
fi

TAGS="$TAGS,$IMAGE:latest-${{ matrix.node }}${{ matrix.suffix }}"
TAGS="$TAGS,$IMAGE:latest-${{ matrix.node }}${{ matrix.suffix }},$GH_IMAGE:latest-${{ matrix.node }}${{ matrix.suffix }}"

else
IMAGE=${{ env.DEV_IMAGE }}
GH_IMAGE=${{ env.GH_DEV_IMAGE}}
if [[ "$TRAVIS_TAG" == *"dev"* || "$TRAVIS_TAG" == *"beta"* ]]; then
PUSH=true
else
PUSH=false
fi
VERSION=${TRAVIS_TAG}
TAGS=$(echo $TAGS | sed 's!${{ env.DEFAULT_IMAGE}}!${{ env.DEV_IMAGE }}!')
TAGS=$(echo $TAGS | sed 's!${{ env.GH_IMAGE}}!${{ env.GH_DEV_IMAGE }}!')
if [ "${{ matrix.node }}" == "${{ env.LATEST_NODE }}" ] && [ "${{ matrix.suffix}}" == "" ]; then
TAGS="$TAGS,$IMAGE:$VERSION"
TAGS="$TAGS,$IMAGE:$VERSION,$GH_IMAGE:$VERSION"
fi
fi

# if [[ "${{ matrix.node }}" == "18"]]; then
# echo "platforms=linux/amd64,linux/arm/v7,linux/arm64" >> $GITHUB_OUTPUT
# else
# echo "platforms=linux/amd64,linux/arm64" >> $GITHUB_OUTPUT
# fi

# if [[ "${{ matrix.suffix }}" == "-minimal" ]]; then
# echo "platforms=linux/amd64,linux/arm64" >> $GITHUB_OUTPUT
# else
# echo "platforms=linux/amd64,linux/arm/v7,linux/arm64" >> $GITHUB_OUTPUT
# fi
echo "platforms=linux/amd64,linux/arm/v7,linux/arm64" >> $GITHUB_OUTPUT

echo $TAGS
echo "tags=$TAGS" >> $GITHUB_OUTPUT
echo "push=$PUSH" >> $GITHUB_OUTPUT
Expand All @@ -137,13 +181,20 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
id: build-push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64, linux/arm64
platforms: ${{ steps.nrVersion.outputs.platforms }}
push: ${{ steps.nrVersion.outputs.push }}
file: .docker/Dockerfile.alpine
build-args: |
Expand All @@ -161,21 +212,31 @@ jobs:
# Setting the defaults up front
LATEST_NODE: 20
DEFAULT_IMAGE: nodered/node-red
GH_IMAGE: ghcr.io/node-red/node-red
DEV_IMAGE: nodered/node-red-dev
GH_DEV_IMAGE: ghcr.io/node-red/node-red-dev
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:qemu-v7.0.0-28
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get Date
id: date
# run: echo "::set-output name=date::$(date +'%Y-%m-%dT%H:%M:%SZ')"
Expand All @@ -188,6 +249,7 @@ jobs:
latest=false
images: |
${{ env.DEFAULT_IMAGE }}
${{ env.GH_IMAGE }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
Expand All @@ -196,8 +258,15 @@ jobs:
id: nrVersion
run: |
TAGS=""
while IFS= read -r TAG;do
if [ -z "$TAGS" ]; then
TAGS=$TAG
else
TAGS="$TAGS,$TAG"
fi
done <<< "${{ steps.meta.outputs.tags }}"

echo Original tags ${{ steps.meta.outputs.tags }}
echo "Original tags $TAGS"

if [[ ! -z "${{ github.event.inputs.version }}" ]]; then
TRAVIS_TAG=${{ github.event.inputs.version }}
Expand All @@ -208,14 +277,16 @@ jobs:
if [[ "$TRAVIS_TAG" =~ ^v[0-9\.-]*$ ]]; then
# release build
IMAGE=${{ env.DEFAULT_IMAGE }}
GH_IMAGE=${{ env.GH_IMAGE }}
PUSH=true
VERSION=${TRAVIS_TAG:1}
STABLE_VERSION=`echo ${VERSION} | sed -r 's/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)$/\1.\2/'`

TAGS="$IMAGE:latest-debian,$IMAGE:$VERSION-debian,$IMAGE:$STABLE_VERSION-debian"
TAGS="$IMAGE:latest-debian,$IMAGE:$VERSION-debian,$IMAGE:$STABLE_VERSION-debian,$GH_IMAGE:latest-debian,$GH_IMAGE:$VERSION-debian,$GH_IMAGE:$STABLE_VERSION-debian"

else
IMAGE=${{ env.DEV_IMAGE }}
GH_IMAGE=${{ env.GH_DEV_IMAGE}}
if [[ "$TRAVIS_TAG" == *"dev"* || "$TRAVIS_TAG" == *"beta"* ]]; then
# beta build
PUSH=true
Expand All @@ -224,7 +295,7 @@ jobs:
fi
VERSION=${TRAVIS_TAG}

TAGS="$IMAGE:$VERSION-debian"
TAGS="$IMAGE:$VERSION-debian,$GH_DEV_IMAGE:$VERSION"

fi

Expand Down
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Let's dissect that command:
-p 1880:1880 - connect local port 1880 to the exposed internal port 1880
-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
--name mynodered - give this machine a friendly local name
nodered/node-red - the image to base it on - currently Node-RED v4.0.0
nodered/node-red - the image to base it on - currently Node-RED v4.0.9



Expand All @@ -35,7 +35,7 @@ Running that command should give a terminal window with a running instance of No
Welcome to Node-RED
===================

10 Oct 12:57:10 - [info] Node-RED version: v4.0.0
10 Oct 12:57:10 - [info] Node-RED version: v4.0.9
10 Oct 12:57:10 - [info] Node.js version: v18.19.0
10 Oct 12:57:10 - [info] Linux 6.6.13-100.fc38.x86_64 x64 LE
10 Oct 12:57:11 - [info] Loading palette nodes
Expand Down Expand Up @@ -115,40 +115,40 @@ The following table shows the variety of provided Node-RED images.

| **Tag** |**Node**| **Arch** | **Python** |**Dev**| **Base Image** |
|----------------------------|--------|----------|------------|-------|----------------------------|
| 4.0.0-18 | 18 | amd64 | 3.x | yes | amd64/node:18-alpine |
| 4.0.9-18 | 18 | amd64 | 3.x | yes | amd64/node:18-alpine |
| | 18 | arm32v7 | 3.x | yes | arm32v7/node:18-alpine |
| | 18 | arm64v8 | 3.x | yes | arm64v8/node:18-alpine |
| | 18 | i386 | 3.x | yes | i386/node:18-alpine |
| | | | | | |
| 4.0.0-18-minimal | 18 | amd64 | no | no | amd64/node:18-alpine |
| 4.0.9-18-minimal | 18 | amd64 | no | no | amd64/node:18-alpine |
| | 18 | arm32v7 | no | no | arm32v7/node:18-alpine |
| | 18 | arm64v8 | no | no | arm64v8/node:18-alpine |
| | 18 | i386 | no | no | i386/node:18-alpine |

| **Tag** |**Node**| **Arch** | **Python** |**Dev**| **Base Image** |
|----------------------------|--------|----------|------------|-------|----------------------------|
| 4.0.0-20 | 20 | amd64 | 3.x | yes | amd64/node:20-alpine |
| 4.0.9-20 | 20 | amd64 | 3.x | yes | amd64/node:20-alpine |
| | 20 | arm32v7 | 3.x | yes | arm32v7/node:20-alpine |
| | 20 | arm64v8 | 3.x | yes | arm64v8/node:20-alpine |
| | 20 | i386 | 3.x | yes | i386/node:20-alpine |
| | | | | | |
| 4.0.0-20-minimal | 20 | amd64 | no | no | amd64/node:20-alpine |
| 4.0.9-20-minimal | 20 | amd64 | no | no | amd64/node:20-alpine |
| | 20 | arm32v7 | no | no | arm32v7/node:20-alpine |
| | 20 | arm64v8 | no | no | arm64v8/node:20-alpine |
| | 20 | i386 | no | no | i386/node:20-alpine |
| | | | | | |
| 4.0.0-debian | 20 | amd64 | 3.x | yes | amd64/node:20-buster-slim |
| 4.0.9-debian | 20 | amd64 | 3.x | yes | amd64/node:20-buster-slim |
| | 20 | arm32v7 | 3.x | yes | amd64/node:20-buster-slim |
| | 20 | arm64v8 | 3.x | yes | amd64/node:20-buster-slim |

| **Tag** |**Node**| **Arch** | **Python** |**Dev**| **Base Image** |
|----------------------------|--------|----------|------------|-------|----------------------------|
| 4.0.0-22 | 22 | amd64 | 3.x | yes | amd64/node:22-alpine |
| 4.0.9-22 | 22 | amd64 | 3.x | yes | amd64/node:22-alpine |
| | 22 | arm32v7 | 3.x | yes | arm32v7/node:22-alpine |
| | 22 | arm64v8 | 3.x | yes | arm64v8/node:22-alpine |
| | 22 | i386 | 3.x | yes | i386/node:22-alpine |
| | | | | | |
| 4.0.0-22-minimal | 22 | amd64 | no | no | amd64/node:22-alpine |
| 4.0.9-22-minimal | 22 | amd64 | no | no | amd64/node:22-alpine |
| | 22 | arm32v7 | no | no | arm32v7/node:22-alpine |
| | 22 | arm64v8 | no | no | arm64v8/node:22-alpine |
| | 22 | i386 | no | no | i386/node:22-alpine |
Expand All @@ -160,36 +160,36 @@ The following table shows the provided Manifest Lists.

| **Tag** | **Node-RED Base Image** |
|----------------------------------------|--------------------------------------------|
| latest, 4.0.0, | nodered/node-red:4.0.0-20 |
| latest-20, 4.0.0-20 | |
| latest, 4.0.9, | nodered/node-red:4.0.9-20 |
| latest-20, 4.0.9-20 | |
| | |
| | |
| latest-minimal, 4.0.0-minimal, | nodered/node-red:4.0.0-20-minimal |
| latest-20-minimal, 4.0.0-20-minimal | |
| latest-minimal, 4.0.9-minimal, | nodered/node-red:4.0.9-20-minimal |
| latest-20-minimal, 4.0.9-20-minimal | |
| | |
| latest-debian | nodered/node-red:latest-debian |


| **Tag** | **Node-RED Base Image** |
|----------------------------------------|--------------------------------------------|
| latest-18, 4.0.0-18 | nodered/node-red:4.0.0-18 |
| latest-18, 4.0.9-18 | nodered/node-red:4.0.9-18 |
| | |
| latest-18-minimal, 4.0.0-18-minimal | nodered/node-red:4.0.0-18-minimal |
| latest-18-minimal, 4.0.9-18-minimal | nodered/node-red:4.0.9-18-minimal |


| **Tag** | **Node-RED Base Image** |
|----------------------------------------|--------------------------------------------|
| latest-22, 4.0.0-22 | nodered/node-red:4.0.0-22 |
| latest-22, 4.0.9-22 | nodered/node-red:4.0.9-22 |
| | |
| latest-22-minimal, 4.0.0-22-minimal | nodered/node-red:4.0.0-22-minimal
| latest-22-minimal, 4.0.9-22-minimal | nodered/node-red:4.0.9-22-minimal


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

Therefore all tags regarding Raspberry PI's are dropped.

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.
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.9-20`), and run the container.


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

"dependencies": {
"node-red": "^4.0.0", <-- set the version of Node-RED here
"node-red": "^4.0.9", <-- set the version of Node-RED here
"node-red-dashboard": "*" <-- add any extra npm packages here
},

Expand Down
Loading