# Next.js standalone build into distroless node — runs `node server.js` with # no package manager or shell; fonts and all assets are vendored in-repo so # the image is fully self-contained for air-gapped installs. FROM node:22-alpine AS builder WORKDIR /app COPY frontend/package.json frontend/package-lock.json ./ RUN npm ci COPY frontend/ ./ RUN npm run build FROM gcr.io/distroless/nodejs22-debian12:nonroot WORKDIR /app COPY --from=builder /app/.next/standalone ./ COPY --from=builder /app/.next/static ./.next/static COPY --from=builder /app/public ./public ENV PORT=3000 HOSTNAME=0.0.0.0 NODE_ENV=production EXPOSE 3000 CMD ["server.js"]