Dockerfile fixed

This commit is contained in:
2025-08-20 14:18:59 +03:00
parent 34b9672a36
commit 2ae671c962

View File

@@ -1,12 +1,14 @@
FROM node:22.18.0-alpine as build FROM node:22-bullseye AS build
WORKDIR /usr/app WORKDIR /app
COPY . /usr/app COPY . .
RUN npm i RUN rm -rf node_modules package-lock.json
RUN npm install
RUN npm run build RUN npm run build
FROM nginx:1.23.1-alpine FROM nginx:alpine
RUN rm -rf /usr/share/nginx/html/* COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
COPY --from=build /usr/app/dist /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"] CMD ["nginx", "-g", "daemon off;"]