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"]