From 07ef8704aeae7386d683b3d78f3d5ba50af90ad2 Mon Sep 17 00:00:00 2001 From: Baptiste Augrain Date: Tue, 6 Feb 2024 21:57:01 +0100 Subject: [PATCH] fix: use env statements --- focal-x64/Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/focal-x64/Dockerfile b/focal-x64/Dockerfile index 00913d2..fb3d97a 100644 --- a/focal-x64/Dockerfile +++ b/focal-x64/Dockerfile @@ -68,14 +68,18 @@ RUN apt-get update && apt-get install -y \ # && echo 'Defaults env_keep += "DEBIAN_FRONTEND"' >> /etc/sudoers.d/env_keep # NVM +ENV NVM_VERSION v0.39.7 +ENV NVM_DIR /root/nvm +ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules +ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH +RUN mkdir $NVM_DIR RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash -RUN export NVM_DIR="$HOME/.nvm" && . "$NVM_DIR/nvm.sh" && echo $PATH # Node.js RUN wget https://unofficial-builds.nodejs.org/download/release/v18.19.0/node-v18.19.0-linux-x64-glibc-217.tar.xz RUN tar -xf node-v18.19.0-linux-x64-glibc-217.tar.xz RUN mkdir -p ~/.nvm/versions/node && mv node-v18.19.0-linux-x64-glibc-217 ~/.nvm/versions/node/v18.99.0 -RUN . "$NVM_DIR/nvm.sh" && nvm use 18.99.0 +RUN nvm use 18.99.0 RUN npm install -g npm@latest node-gyp yarn # Set python3 as default