chore: Update node and npm installation in Dockerfiles

The Dockerfiles for the Linux images have been updated to use the latest version of node and npm. This change improves the build process for the vite frontend by ensuring that the correct versions of node and npm are installed.
This commit is contained in:
Théophile Diot 2024-08-08 12:48:35 +01:00
parent 727a6b026f
commit c61f0d1784
No known key found for this signature in database
GPG key ID: FA995104A0BA376A
3 changed files with 7 additions and 4 deletions

View file

@ -40,7 +40,8 @@ RUN export MAKEFLAGS="-j$(nproc)" && \
pip install --break-system-packages --no-cache-dir --require-hashes --target deps/python $(for file in $(ls /tmp/req/requirements*.txt) ; do echo "-r ${file}" ; done | xargs)
# Install node and npm to build vite frontend
RUN apt-get install -y --no-install-recommends nodejs npm
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y --no-install-recommends nodejs
# Copy files
# can't exclude deps from . so we are copying everything by hand

View file

@ -40,7 +40,8 @@ RUN export MAKEFLAGS="-j$(nproc)" && \
pip install --no-cache-dir --require-hashes --break-system-packages --target deps/python $(for file in $(ls /tmp/req/requirements*.txt) ; do echo "-r ${file}" ; done | xargs)
# Install node and npm to build vite frontend
RUN apt-get install -y --no-install-recommends nodejs npm
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y --no-install-recommends nodejs
# Copy files
# can't exclude deps from . so we are copying everything by hand

View file

@ -1,4 +1,4 @@
FROM ubuntu:22.04@sha256:340d9b015b194dc6e2a13938944e0d016e57b9679963fdeb9ce021daac430221 as builder
FROM ubuntu:22.04@sha256:340d9b015b194dc6e2a13938944e0d016e57b9679963fdeb9ce021daac430221 AS builder
ENV OS=ubuntu
ENV NGINX_VERSION=1.26.1
@ -40,7 +40,8 @@ RUN export MAKEFLAGS="-j$(nproc)" && \
pip install --no-cache-dir --require-hashes --target deps/python $(for file in $(ls /tmp/req/requirements*.txt) ; do echo "-r ${file}" ; done | xargs)
# Install node and npm to build vite frontend
RUN apt-get install -y --no-install-recommends nodejs npm
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y --no-install-recommends nodejs
# Copy files
# can't exclude deps from . so we are copying everything by hand