From dab0a26cc35118bee32ce33042361fcaa52758f6 Mon Sep 17 00:00:00 2001 From: Son NK Date: Tue, 4 Feb 2020 17:19:31 +0700 Subject: [PATCH] Install npm packages in Dockerfile --- Dockerfile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fe06763f..88132fbf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,20 @@ -FROM python:3.7 +# Install npm packages +FROM node:10.17.0-alpine AS npm +WORKDIR /code +COPY ./static/package*.json /code/static/ +RUN cd /code/static && npm install + +FROM python:3.7 WORKDIR /code # install dependencies COPY ./requirements.txt ./ RUN pip3 install --no-cache-dir -r requirements.txt +# copy npm packages +COPY --from=npm /code /code + # copy everything else into /code COPY . .