edit Dockerfile
This commit is contained in:
parent
6ebb08b67c
commit
cf901d1ee1
1 changed files with 5 additions and 5 deletions
|
|
@ -1,5 +1,5 @@
|
|||
# docker build . -t docker.frappet.com/demo/qualifying-exam-cms:latest
|
||||
FROM node:20-alpine as build-stage
|
||||
FROM node:20-alpine AS build-stage
|
||||
WORKDIR /app
|
||||
# optimize build speed by copy all .xx folder and
|
||||
COPY *.json .
|
||||
|
|
@ -7,11 +7,11 @@ COPY *.*s .
|
|||
RUN npm i
|
||||
COPY static ./static
|
||||
COPY src ./src
|
||||
# RUN ls
|
||||
RUN npm run build
|
||||
FROM node:lts-alpine
|
||||
|
||||
FROM node:lts-alpine AS production-stage
|
||||
WORKDIR /app
|
||||
COPY --from=build /app .
|
||||
COPY --from=build-stage /app .
|
||||
EXPOSE 80
|
||||
ENV PORT=80
|
||||
CMD ["node", "./build/index.js"]
|
||||
CMD ["node", "./build/index.js"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue