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
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
EXPOSE 80
COPY --from=build /usr/app/dist /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"]