Update Dockerfile
This commit is contained in:
parent
93d3832bab
commit
d6a7a35042
1 changed files with 6 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
FROM node:alpine
|
FROM node:alpine as builder
|
||||||
|
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
@ -6,4 +6,9 @@ COPY --chown=node:node . .
|
||||||
RUN apk add --no-cache python3 make build-base \
|
RUN apk add --no-cache python3 make build-base \
|
||||||
&& npm install .
|
&& npm install .
|
||||||
|
|
||||||
|
FROM node:alpine as runner
|
||||||
|
WORKDIR /usr/src/app
|
||||||
|
COPY --from=builder /usr/src/app/node_modules ./node_modules
|
||||||
|
COPY --from=builder /usr/src/app ./
|
||||||
|
USER node
|
||||||
CMD ["node", "run", "start"]
|
CMD ["node", "run", "start"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue