Install Node.js from pinned tarball

This commit is contained in:
Beslan
2026-06-02 06:12:56 +03:00
parent e9a7fe5f62
commit d9386e050b

View File

@@ -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"