From 65c83e5b5b05d6c615c633540808cff18554110f Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Tue, 28 Nov 2023 15:37:19 +0000 Subject: [PATCH] Fixed nodejs installation --- dockerfile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/dockerfile b/dockerfile index c2ff2b0..3ec128c 100644 --- a/dockerfile +++ b/dockerfile @@ -29,9 +29,17 @@ RUN python3.10 -m pip install cpl-cli --extra-index-url https://pip.sh-edraft.de RUN python3.10 -m pip install cpl-query --extra-index-url https://pip.sh-edraft.de # install node -RUN sud curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - -RUN sudo apt -y install nodejs -RUN sudo apt -y install npm +ENV NVM_DIR /usr/local/nvm # or ~/.nvm , depending + +# Install nvm with node and npm +ENV NVM_DIR /usr/local/nvm +ENV NODE_VERSION v21.2.0 +RUN sudo mkdir -p /usr/local/nvm && apt-get update && echo "y" | apt-get install curl +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash +RUN sudo /bin/bash -c "source $NVM_DIR/nvm.sh && nvm install $NODE_VERSION && nvm use --delete-prefix $NODE_VERSION" +ENV NODE_PATH $NVM_DIR/versions/node/$NODE_VERSION/bin +ENV PATH $NODE_PATH:$PATH + RUN sudo npm install -g @angular/cli RUN sudo npm install -g ts-node