blob: af607d21a8315b542b65bf10f1f7ad72222c9fb2 [file] [log] [blame]
Xing Jinwen11496472025-06-06 13:16:26 +08001# Build stage
2#FROM registry.cn-hangzhou.aliyuncs.com/library/node:18-alpine as build-stage
3FROM node:18-alpine AS build
4WORKDIR /app
5COPY package*.json ./
6RUN npm install
7COPY .. .
8RUN npm run build
9
10# Production stage
11#FROM registry.cn-hangzhou.aliyuncs.com/library/nginx:stable-alpine as production-stage
12FROM nginx:stable-alpine AS base
13COPY --from=build /app/dist /usr/share/nginx/html
14EXPOSE 80
15CMD ["nginx", "-g", "daemon off;"]