example: use multistage builds to better demostrate use of dev and prod images

This commit is contained in:
Sameer Naik 2017-10-06 15:10:22 +05:30
parent fcc73b17fa
commit 337f3437a4
1 changed files with 11 additions and 1 deletions

View File

@ -1,4 +1,4 @@
FROM bitnami/node:6-prod
FROM bitnami/node:6 as builder
ENV NODE_ENV="production"
@ -8,4 +8,14 @@ WORKDIR /app
RUN npm install
FROM bitnami/node:6-prod
ENV NODE_ENV="production"
COPY --from=builder /app /app
WORKDIR /app
EXPOSE 3000
CMD ["npm", "start"]