From df08d2d316ca5b1dcac098be4bb120bd7a55c2f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ernesto=20C=C3=A1rdenas?= Date: Thu, 2 Jan 2020 10:00:15 -0500 Subject: [PATCH] Adding npm to image Since mcr.microsoft.com/azure-functions doesn't include npm this is required to work properly --- Dockerfile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 644f201..a32890d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,4 +2,13 @@ FROM mcr.microsoft.com/azure-functions/node:2.0 ENV AzureWebJobsScriptRoot=/home/site/wwwroot ENV AzureFunctionsJobHost__Logging__Console__IsEnabled=true -COPY . /home/site/wwwroot \ No newline at end of file + +RUN apt-get install -y curl \ + && curl -sL https://deb.nodesource.com/setup_9.x | bash - \ + && apt-get install -y nodejs \ + && curl -L https://www.npmjs.com/install.sh | sh + +COPY . /home/site/wwwroot + +RUN cd /home/site/wwwroot && \ + npm install