From b1f59956a0cb0bf056f671da485b4dd33da03fcb 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 example services build faster --- examples/hello-world/services/hello-container/Dockerfile | 5 +++-- 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 +++-- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/examples/hello-world/services/hello-container/Dockerfile b/examples/hello-world/services/hello-container/Dockerfile index dba34bf13a..4a418d7d1e 100644 --- a/examples/hello-world/services/hello-container/Dockerfile +++ b/examples/hello-world/services/hello-container/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/local-tls/services/node-service/Dockerfile b/examples/local-tls/services/node-service/Dockerfile index dba34bf13a..4a418d7d1e 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 dba34bf13a..4a418d7d1e 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 dba34bf13a..4a418d7d1e 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 dba34bf13a..4a418d7d1e 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"]