From 10479e82b80cb2b79ae6c032a8d182083903d337 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Sat, 13 Jun 2026 07:16:16 +0200 Subject: [PATCH] switch from n to nvm as that is an offical channel (#12140) --- contrib/container/Dockerfile | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/contrib/container/Dockerfile b/contrib/container/Dockerfile index 206bdba629..fd7b4e1995 100644 --- a/contrib/container/Dockerfile +++ b/contrib/container/Dockerfile @@ -18,6 +18,7 @@ ARG commit_hash="" ARG commit_date="" ARG data_dir="data" +ARG NODE_VERSION=24 ENV PYTHONUNBUFFERED=1 ENV PIP_DISABLE_PIP_VERSION_CHECK=1 @@ -118,15 +119,10 @@ RUN pip install --user --require-hashes -r base_requirements.txt --no-cache-dir rm -rf /root/.cache/pip # Install frontend build dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - nodejs npm \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -RUN npm install -g n@10.2.0 yarn --ignore-scripts && \ - yarn config set network-timeout 600000 -g -RUN bash -c "n lts" -RUN cd "${INVENTREE_HOME}" && invoke int.frontend-compile --extract +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.5/install.sh | bash && \ + bash -c "export NVM_DIR="$HOME/.nvm" && source $HOME/.nvm/nvm.sh && \ + nvm install $NODE_VERSION && corepack enable yarn && yarn config set network-timeout 600000 -g" +RUN bash -c "source $HOME/.nvm/nvm.sh && cd '${INVENTREE_HOME}' && invoke int.frontend-compile --extract" # InvenTree production image: # - Copies required files from local directory