From b058174c62c63b0339fac78e69e37e70fac65b0e Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Mon, 26 Nov 2018 17:09:23 -0500 Subject: [PATCH] Add npm to docker build --- .dockerignore | 3 +++ build/Dockerfile | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/.dockerignore b/.dockerignore index 1dfe466b59..556eeba31d 100644 --- a/.dockerignore +++ b/.dockerignore @@ -7,3 +7,6 @@ packages */bin */obj tests +tools +src/Tgstation.Server.Host/ClientApp/node_modules +src/Tgstation.Server.Host/wwwroot diff --git a/build/Dockerfile b/build/Dockerfile index 108f7ddfbf..8bd83435a4 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,5 +1,16 @@ FROM microsoft/dotnet:2.1-sdk AS build +ARG NODE_VERSION=11.1.0 + +# install node and npm +# replace shell with bash so we can source files +RUN rm /bin/sh && ln -s /bin/bash /bin/sh +RUN curl --silent -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.2/install.sh | bash + +RUN source /root/.nvm/nvm.sh \ + && nvm install $NODE_VERSION \ + && nvm use $NODE_VERSION + WORKDIR /src COPY tgstation-server.sln ./