FROM node:lts-alpine as build-stage WORKDIR /app COPY src/package*.json ./ RUN npm install COPY src/. . RUN rm -rf dist/ RUN npm run build FROM nginx:stable-alpine as production-stage COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf COPY --from=build-stage /app/dist /usr/share/nginx/html EXPOSE 80 CMD ["nginx", "-g", "daemon off;"]