From e2ab697e7b207e50fa3e7a86cff4b1c1bc0e641c Mon Sep 17 00:00:00 2001 From: Jon Edvald Date: Tue, 25 Sep 2018 22:13:22 +0200 Subject: [PATCH] chore(examples): make node-service build faster --- examples/local-tls/services/node-service/Dockerfile | 5 +++-- examples/remote-k8s/services/node-service/Dockerfile | 5 +++-- .../simple-project-start/services/node-service/Dockerfile | 5 +++-- examples/simple-project/services/node-service/Dockerfile | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/examples/local-tls/services/node-service/Dockerfile b/examples/local-tls/services/node-service/Dockerfile index dba34bf13a1..4a418d7d1e9 100644 --- a/examples/local-tls/services/node-service/Dockerfile +++ b/examples/local-tls/services/node-service/Dockerfile @@ -2,10 +2,11 @@ FROM node:9-alpine ENV PORT=8080 EXPOSE ${PORT} - -ADD . /app WORKDIR /app +ADD package.json /app RUN npm install +ADD . /app + CMD ["npm", "start"] diff --git a/examples/remote-k8s/services/node-service/Dockerfile b/examples/remote-k8s/services/node-service/Dockerfile index dba34bf13a1..4a418d7d1e9 100644 --- a/examples/remote-k8s/services/node-service/Dockerfile +++ b/examples/remote-k8s/services/node-service/Dockerfile @@ -2,10 +2,11 @@ FROM node:9-alpine ENV PORT=8080 EXPOSE ${PORT} - -ADD . /app WORKDIR /app +ADD package.json /app RUN npm install +ADD . /app + CMD ["npm", "start"] diff --git a/examples/simple-project-start/services/node-service/Dockerfile b/examples/simple-project-start/services/node-service/Dockerfile index dba34bf13a1..4a418d7d1e9 100644 --- a/examples/simple-project-start/services/node-service/Dockerfile +++ b/examples/simple-project-start/services/node-service/Dockerfile @@ -2,10 +2,11 @@ FROM node:9-alpine ENV PORT=8080 EXPOSE ${PORT} - -ADD . /app WORKDIR /app +ADD package.json /app RUN npm install +ADD . /app + CMD ["npm", "start"] diff --git a/examples/simple-project/services/node-service/Dockerfile b/examples/simple-project/services/node-service/Dockerfile index dba34bf13a1..4a418d7d1e9 100644 --- a/examples/simple-project/services/node-service/Dockerfile +++ b/examples/simple-project/services/node-service/Dockerfile @@ -2,10 +2,11 @@ FROM node:9-alpine ENV PORT=8080 EXPOSE ${PORT} - -ADD . /app WORKDIR /app +ADD package.json /app RUN npm install +ADD . /app + CMD ["npm", "start"]