fix dockerfile
This commit is contained in:
parent
52e9bfb4f2
commit
c8f1a416d3
1 changed files with 3 additions and 4 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
# docker build . -t docker.frappet.com/demo/fe:latest
|
# docker build . -t docker.frappet.com/demo/fe:latest
|
||||||
FROM node:20-alpine as build-stage
|
FROM node:20-alpine AS build-stage
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
@ -7,15 +7,14 @@ COPY ./ .
|
||||||
|
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM nginx as production-stage
|
FROM nginx AS production-stage
|
||||||
|
|
||||||
RUN mkdir /app
|
RUN mkdir /app
|
||||||
COPY --from=build-stage /app/dist /app
|
COPY --from=build-stage /app/dist /app
|
||||||
COPY nginx.conf /etc/nginx/nginx.conf
|
COPY docker/nginx.conf /etc/nginx/nginx.conf
|
||||||
|
|
||||||
# COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
# COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||||
# RUN chmod u+x /usr/local/bin/entrypoint.sh
|
# RUN chmod u+x /usr/local/bin/entrypoint.sh
|
||||||
|
|
||||||
|
|
||||||
# ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
# ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue