chore: optimize pnpm install with build cache in Dockerfile

This commit is contained in:
typist
2025-10-28 04:17:10 +08:00
parent 660839d854
commit 48aaa262c1

View File

@@ -11,7 +11,8 @@ WORKDIR /app
COPY package.json pnpm-lock.yaml ./ COPY package.json pnpm-lock.yaml ./
# 安装依赖 # 安装依赖
RUN pnpm install --frozen-lockfile RUN --mount=type=cache,target=/root/.local/share/pnpm/store \
pnpm install --frozen-lockfile
# 复制源代码 # 复制源代码
COPY . . COPY . .