Skip to content

Commit 5b515dd

Browse files
authored
chore: fix node image to fall back to node 22 for armv7 (#318)
1 parent 2ce8cd8 commit 5b515dd

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

images/node/ubuntu.Dockerfile

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,19 @@ FROM codercom/enterprise-base:ubuntu
33
# Run everything as root
44
USER root
55

6-
# Install whichever Node version is LTS
7-
RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash -
8-
RUN DEBIAN_FRONTEND="noninteractive" apt-get update -y && \
6+
ARG TARGETARCH
7+
ARG TARGETVARIANT
8+
9+
# Install Node.js with platform-specific version
10+
# armv7: Node.js 22.x (last version with armv7 support)
11+
# others: Latest LTS
12+
# Ref: https://github.com/nodesource/distributions/issues/1881
13+
RUN NODE_VERSION="lts"; \
14+
if [ "${TARGETARCH}${TARGETVARIANT}" = "armv7" ]; then \
15+
NODE_VERSION="22"; \
16+
fi && \
17+
curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash - && \
18+
DEBIAN_FRONTEND="noninteractive" apt-get update -y && \
919
apt-get install -y nodejs
1020

1121
# Install Yarn

scripts/images.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
set -euo pipefail
44

5+
# IMAGES defines the list of images to build/push IN ORDER.
56
IMAGES=(
67
"base"
78
"minimal"

0 commit comments

Comments
 (0)