From 5c7251afce645759d9b090f75971e479c55e0f6c Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Wed, 12 Feb 2020 13:54:45 +0100 Subject: [PATCH] Merge pull request #2596 from overleaf/jpa-build-scripts-1-3-5 [misc] align the Dockerfile to the build scripts version 1.3.5 GitOrigin-RevId: cdda059b68068b9b4de87520cff91ce179426836 --- services/web/Dockerfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/services/web/Dockerfile b/services/web/Dockerfile index b382436e18..4ab3a43537 100644 --- a/services/web/Dockerfile +++ b/services/web/Dockerfile @@ -1,7 +1,12 @@ -FROM node:10.19.0 as app +FROM node:10.19.0 as base WORKDIR /app +# install_deps changes app files and installs npm packages +# as such it has to run at a later stage + +FROM base as app + #wildcard as some files may not be in all repos COPY package.json package-lock.json /app/ @@ -10,7 +15,7 @@ RUN npm install --quiet COPY . /app -FROM node:10.19.0 +FROM base COPY --from=app /app /app