Multi-stage Docker build: node:20-alpine + nginx:1.27-alpine. CI builds and pushes to harbor-in-k3s.cheverjohn.me/iloom/iloom-frontend. Co-Authored-By: Claude <noreply@anthropic.com>
12 lines
244 B
Docker
12 lines
244 B
Docker
FROM node:20-alpine AS builder
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
FROM nginx:1.27-alpine
|
|
COPY --from=builder /app/dist /usr/share/nginx/html
|
|
EXPOSE 3015
|
|
CMD ["nginx", "-g", "daemon off;"]
|