mirror of
https://github.com/inventree/InvenTree.git
synced 2026-07-05 06:32:55 +00:00
switch from n to nvm as that is an offical channel (#12140)
This commit is contained in:
@@ -18,6 +18,7 @@ ARG commit_hash=""
|
|||||||
ARG commit_date=""
|
ARG commit_date=""
|
||||||
|
|
||||||
ARG data_dir="data"
|
ARG data_dir="data"
|
||||||
|
ARG NODE_VERSION=24
|
||||||
|
|
||||||
ENV PYTHONUNBUFFERED=1
|
ENV PYTHONUNBUFFERED=1
|
||||||
ENV PIP_DISABLE_PIP_VERSION_CHECK=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
|
rm -rf /root/.cache/pip
|
||||||
|
|
||||||
# Install frontend build dependencies
|
# Install frontend build dependencies
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.5/install.sh | bash && \
|
||||||
nodejs npm \
|
bash -c "export NVM_DIR="$HOME/.nvm" && source $HOME/.nvm/nvm.sh && \
|
||||||
&& apt-get clean \
|
nvm install $NODE_VERSION && corepack enable yarn && yarn config set network-timeout 600000 -g"
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
RUN bash -c "source $HOME/.nvm/nvm.sh && cd '${INVENTREE_HOME}' && invoke int.frontend-compile --extract"
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
# InvenTree production image:
|
# InvenTree production image:
|
||||||
# - Copies required files from local directory
|
# - Copies required files from local directory
|
||||||
|
|||||||
Reference in New Issue
Block a user