main
mula.liu 2025-11-05 15:27:45 +08:00
parent cf49bcf013
commit aafc2c6bf0
1 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,5 @@
# 构建阶段
FROM node:18-alpine AS builder
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/node:18-slim AS builder
WORKDIR /app
@ -17,10 +17,12 @@ COPY . .
RUN yarn build
# 生产阶段
FROM node:18-alpine
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/node:18-slim
WORKDIR /app
# 使用国内源
RUN npm config set registry https://registry.npmmirror.com
# 安装 PM2 和 serve
RUN npm install -g pm2 serve