chore: Update Dockerfile to install Node.js and npm in a better way in fedora and rhel

This commit is contained in:
Théophile Diot 2024-08-08 16:38:42 +01:00
parent 04a2c7ae08
commit 1f1612165a
No known key found for this signature in database
GPG key ID: FA995104A0BA376A
3 changed files with 6 additions and 3 deletions

View file

@ -36,7 +36,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 dnf install -y nodejs npm
RUN curl -fsSL https://rpm.nodesource.com/setup_20.x | bash - && \
dnf install -y --setopt=install_weak_deps=False nodejs
# Copy files
# can't exclude deps from . so we are copying everything by hand

View file

@ -47,7 +47,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 dnf install -y nodejs npm
RUN curl -fsSL https://rpm.nodesource.com/setup_20.x | bash - && \
dnf install -y --setopt=install_weak_deps=False nodejs
# Copy files
# can't exclude deps from . so we are copying everything by hand

View file

@ -50,7 +50,8 @@ RUN export MAKEFLAGS="-j$(nproc)" && \
python3 -m 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 dnf install -y nodejs npm
RUN curl -fsSL https://rpm.nodesource.com/setup_20.x | bash - && \
dnf install -y --setopt=install_weak_deps=False nodejs
# Copy files
# can't exclude deps from . so we are copying everything by hand