example: use multistage builds to better demostrate use of dev and prod images
This commit is contained in:
parent
fcc73b17fa
commit
337f3437a4
|
|
@ -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"]
|
||||
|
|
|
|||
Loading…
Reference in New Issue