2081595154 | 8db5f2a | 2025-06-09 23:58:33 +0800 | [diff] [blame] | 1 | # Build stage |
2 | #FROM registry.cn-hangzhou.aliyuncs.com/library/node:18-alpine as build-stage | ||||
3 | FROM node:18-alpine AS build | ||||
4 | WORKDIR /app | ||||
5 | COPY package*.json ./ | ||||
6 | RUN npm install | ||||
7 | COPY .. . | ||||
8 | RUN npm run build | ||||
9 | |||||
10 | # Production stage | ||||
11 | #FROM registry.cn-hangzhou.aliyuncs.com/library/nginx:stable-alpine as production-stage | ||||
12 | FROM nginx:stable-alpine AS base | ||||
13 | COPY --from=build /app/dist /usr/share/nginx/html | ||||
14 | EXPOSE 80 | ||||
15 | CMD ["nginx", "-g", "daemon off;"] |