Dockerfile fixed
This commit is contained in:
18
Dockerfile
18
Dockerfile
@@ -1,12 +1,14 @@
|
||||
FROM node:22.18.0-alpine as build
|
||||
FROM node:22-bullseye AS build
|
||||
|
||||
WORKDIR /usr/app
|
||||
COPY . /usr/app
|
||||
RUN npm i
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN rm -rf node_modules package-lock.json
|
||||
RUN npm install
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:1.23.1-alpine
|
||||
RUN rm -rf /usr/share/nginx/html/*
|
||||
FROM nginx:alpine
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
|
||||
COPY --from=build /usr/app/dist /usr/share/nginx/html
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
||||
Reference in New Issue
Block a user