FROM node:18.19-alpine AS builder ARG VITE_EXTRA_HEAD WORKDIR /app-builder COPY ./package*.json ./ RUN npm ci COPY . . RUN npm run build FROM docker.io/library/nginx:1.27.2 # Enable 404.html page RUN sed -i '12s/#//' /etc/nginx/conf.d/default.conf && cat /etc/nginx/conf.d/default.conf COPY --from=builder /app-builder/build /usr/share/nginx/html