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
|
# 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
|
WORKDIR /app
|
||||||
# optimize build speed by copy all .xx folder and
|
# optimize build speed by copy all .xx folder and
|
||||||
COPY *.json .
|
COPY *.json .
|
||||||
|
|
@ -7,11 +7,11 @@ COPY *.*s .
|
||||||
RUN npm i
|
RUN npm i
|
||||||
COPY static ./static
|
COPY static ./static
|
||||||
COPY src ./src
|
COPY src ./src
|
||||||
# RUN ls
|
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
FROM node:lts-alpine
|
|
||||||
|
FROM node:lts-alpine AS production-stage
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=build /app .
|
COPY --from=build-stage /app .
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
ENV PORT=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