更新 Dockerfile
This commit is contained in:
@@ -4,12 +4,10 @@ WORKDIR /app
|
||||
# 阶段1: 安装所有依赖(包括 devDependencies,因为构建需要)
|
||||
FROM base AS deps
|
||||
COPY package*.json ./
|
||||
RUN npm config set registry https://npmmirror.com
|
||||
RUN npm ci
|
||||
|
||||
# 阶段2: 构建应用
|
||||
FROM base AS builder
|
||||
RUN npm config set registry https://npmmirror.com
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
RUN npx prisma generate
|
||||
|
||||
Reference in New Issue
Block a user