From 92179aca6bec24d71a6b5eb40a5a7a48955dda1a Mon Sep 17 00:00:00 2001 From: Vince Grassia <593223+vgrassia@users.noreply.github.com> Date: Thu, 9 Nov 2023 12:56:19 -0500 Subject: [PATCH] Fix nvm --- src/Admin/Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Admin/Dockerfile b/src/Admin/Dockerfile index 5b9b66defe..d333589b52 100644 --- a/src/Admin/Dockerfile +++ b/src/Admin/Dockerfile @@ -3,6 +3,7 @@ FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/aspnet:6.0 AS dotnet-bui # Docker buildx supplies the value for this arg ARG TARGETPLATFORM ENV NODE_VERSION=16 +ENV NVM_DIR /usr/local/nvm # Determine proper runtime value for .NET # We put the value in a file to be read by later layers. @@ -21,8 +22,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* # Add packages -RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash -RUN . ~/.bash_rc +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash \ + && . $NVM_DIR/nvm.sh \ + && nvm install $NODE_VERSION \ + && nvm alias default $NODE_VERSION \ + && nvm use default RUN npm install -g gulp WORKDIR /source