Use dnf module for Node.js 18 instead of n version manager - damn it aarch64 (#16225)

Use dnf module for Node.js 18 instead of n version manager

The n version manager fails to extract Node.js archives due to very long
file paths in include/node/openssl/archs/ directories when running in
Docker BuildKit's overlay filesystem. This causes CI build failures with
tar "Cannot open: Invalid argument" errors.

Switch to installing Node.js 18 directly from CentOS Stream 9's module
stream which avoids the archive extraction issue entirely.
This commit is contained in:
Hao Liu 2026-01-09 13:37:34 -05:00 committed by GitHub
parent d018096cae
commit b0debf93a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,8 +8,7 @@
# UI_next build contaienr
FROM quay.io/centos/centos:stream9 AS ui-builder
USER root
RUN dnf -y update && dnf install -y nodejs make git
RUN npm install -g n && n 18
RUN dnf -y update && dnf module -y enable nodejs:18 && dnf module -y install nodejs:18/common && dnf install -y make git
COPY . /tmp/src/
WORKDIR /tmp/src/
@ -159,7 +158,8 @@ RUN rm -rf /root/.cache && rm -rf /tmp/*
{% if (build_dev|bool) or (kube_dev|bool) %}
# Install development/test requirements
RUN dnf -y install \
RUN dnf module -y enable nodejs:18 && dnf module -y install nodejs:18/common && \
dnf -y install \
crun \
gdb \
gtk3 \
@ -174,7 +174,6 @@ RUN dnf -y install \
vim \
nmap-ncat \
libpq-devel \
nodejs \
nss \
make \
patch \
@ -182,8 +181,7 @@ RUN dnf -y install \
tmux \
wget \
diffutils \
unzip && \
npm install -g n && n 18 && dnf remove -y nodejs
unzip
RUN pip3.12 install -vv git+https://github.com/coderanger/supervisor-stdout.git@973ba19967cdaf46d9c1634d1675fc65b9574f6e
RUN pip3.12 install -vv black setuptools-scm build