Files
kt-frontend/Dockerfile
2026-01-04 11:25:16 +01:00

17 lines
501 B
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Stage 1 Build (run on the host platform so npm/esbuild stay native)
FROM --platform=$BUILDPLATFORM node:24-alpine AS build
ARG VITE_MODE=production
ENV VITE_MODE=$VITE_MODE
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build -- --mode "$VITE_MODE"
#Stage 2 Serve (target platform is whatever we are building for)
FROM nginx:1.27-alpine
ARG VITE_MODE=production
COPY --from=build /app/dist/${VITE_MODE} /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]