From 8df2b790b90b0c0498005b2893020d350af9b5b2 Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Mon, 12 Jan 2026 17:58:00 +0000 Subject: [PATCH] chore: fix node image to fall back to node 22 for armv7 --- images/node/ubuntu.Dockerfile | 16 +++++++++++++--- scripts/images.sh | 1 + 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/images/node/ubuntu.Dockerfile b/images/node/ubuntu.Dockerfile index b466aca5..fb79dc3a 100644 --- a/images/node/ubuntu.Dockerfile +++ b/images/node/ubuntu.Dockerfile @@ -3,9 +3,19 @@ FROM codercom/enterprise-base:ubuntu # Run everything as root USER root -# Install whichever Node version is LTS -RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash - -RUN DEBIAN_FRONTEND="noninteractive" apt-get update -y && \ +ARG TARGETARCH +ARG TARGETVARIANT + +# Install Node.js with platform-specific version +# armv7: Node.js 22.x (last version with armv7 support) +# others: Latest LTS +# Ref: https://github.com/nodesource/distributions/issues/1881 +RUN NODE_VERSION="lts"; \ + if [ "${TARGETARCH}${TARGETVARIANT}" = "armv7" ]; then \ + NODE_VERSION="22"; \ + fi && \ + curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash - && \ + DEBIAN_FRONTEND="noninteractive" apt-get update -y && \ apt-get install -y nodejs # Install Yarn diff --git a/scripts/images.sh b/scripts/images.sh index 04394773..85aa0675 100644 --- a/scripts/images.sh +++ b/scripts/images.sh @@ -2,6 +2,7 @@ set -euo pipefail +# IMAGES defines the list of images to build/push IN ORDER. IMAGES=( "base" "minimal"