Skip to content

Commit b0debf9

Browse files
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.
1 parent d018096 commit b0debf9

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

tools/ansible/roles/dockerfile/templates/Dockerfile.j2

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
# UI_next build contaienr
99
FROM quay.io/centos/centos:stream9 AS ui-builder
1010
USER root
11-
RUN dnf -y update && dnf install -y nodejs make git
12-
RUN npm install -g n && n 18
11+
RUN dnf -y update && dnf module -y enable nodejs:18 && dnf module -y install nodejs:18/common && dnf install -y make git
1312

1413
COPY . /tmp/src/
1514
WORKDIR /tmp/src/
@@ -159,7 +158,8 @@ RUN rm -rf /root/.cache && rm -rf /tmp/*
159158

160159
{% if (build_dev|bool) or (kube_dev|bool) %}
161160
# Install development/test requirements
162-
RUN dnf -y install \
161+
RUN dnf module -y enable nodejs:18 && dnf module -y install nodejs:18/common && \
162+
dnf -y install \
163163
crun \
164164
gdb \
165165
gtk3 \
@@ -174,16 +174,14 @@ RUN dnf -y install \
174174
vim \
175175
nmap-ncat \
176176
libpq-devel \
177-
nodejs \
178177
nss \
179178
make \
180179
patch \
181180
socat \
182181
tmux \
183182
wget \
184183
diffutils \
185-
unzip && \
186-
npm install -g n && n 18 && dnf remove -y nodejs
184+
unzip
187185

188186
RUN pip3.12 install -vv git+https://github.com/coderanger/supervisor-stdout.git@973ba19967cdaf46d9c1634d1675fc65b9574f6e
189187
RUN pip3.12 install -vv black setuptools-scm build

0 commit comments

Comments
 (0)