Jotzy/frontend/Dockerfile

15 lines
351 B
Docker
Raw Normal View History

2026-01-06 12:51:40 +00:00
# frontend/Dockerfile
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci # clean install, respects lockfile
COPY . .
RUN npm run build # produces ./dist
# ---- Runtime image (optional) ----
FROM nginx:stable-alpine
COPY --from=builder /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]