Files
ranking_list_h5/Dockerfile
T
2026-02-06 10:24:43 +08:00

17 lines
344 B
Docker

# 1. 第一阶段:构建
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
# 2. 根据 MODE 参数执行对应的打包命令
RUN npm run build
# 2. 第二阶段:部署
FROM nginx:stable-alpine
COPY --from=builder /app/dist /usr/share/nginx/html
COPY ./nginx.conf /etc/nginx/conf.d/default.conf