mirror of
https://github.com/bitnami/containers.git
synced 2026-02-20 06:37:24 +08:00
example: use multistage builds to better demostrate use of dev and prod images
This commit is contained in:
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user