- Refine Dockerfile: replace NODE_MAJOR with ARG_NODE_MAJOR and remove npm from installation

This commit is contained in:
Guillaume "B.B." Van Hemmen 2025-07-14 20:22:10 +02:00
parent 99210a7ad2
commit 65faca46be
Signed by: GuillaumeHemmen
GPG key ID: 7921E64524F7EB35

View file

@ -35,8 +35,8 @@ RUN apt-get update && \
# -------------------------------------------------------------------
# Install Node.js from the official NodeSource repository (no NVM)
# -------------------------------------------------------------------
RUN curl -fsSL "https://deb.nodesource.com/setup_${NODE_MAJOR}.x" | bash - && \
apt-get update && apt-get install -y nodejs npm && \
RUN curl -fsSL "https://deb.nodesource.com/setup_${ARG_NODE_MAJOR}.x" | bash - && \
apt-get update && apt-get install -y nodejs && \
# Clean up apt cache to reduce image size
rm -rf /var/lib/apt/lists/*