|
|
@@ -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
|
|
|
|