From d9386e050be14d6fe071d99d3c291a377b4abe56 Mon Sep 17 00:00:00 2001 From: Beslan Date: Tue, 2 Jun 2026 06:12:56 +0300 Subject: [PATCH] Install Node.js from pinned tarball --- Dockerfile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9741658..0b1a92b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,11 +19,16 @@ RUN apt-get update \ python3-setuptools \ python3-wheel \ unzip \ + xz-utils \ && rm -rf /var/lib/apt/lists/* -RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \ - && apt-get install -y --no-install-recommends nodejs \ - && rm -rf /var/lib/apt/lists/* +ENV NODE_VERSION=20.19.5 +RUN curl -fsSL "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz" -o /tmp/node.tar.xz \ + && mkdir -p /opt/node \ + && tar -xJf /tmp/node.tar.xz -C /opt/node --strip-components=1 \ + && rm /tmp/node.tar.xz + +ENV PATH=/opt/node/bin:${PATH} RUN python3 -m pip install --no-cache-dir "mbed-cli==1.10.5"