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