From 745360f93f1d991a7cf72f10d9a6ee8f6f5be6be Mon Sep 17 00:00:00 2001 From: niyyzf Date: Tue, 29 Jul 2025 14:06:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=20npm=20=E6=9B=BF=E4=BB=A3?= =?UTF-8?q?=20bun?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 49c9897..73b67f1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,13 +8,8 @@ RUN apk add --no-cache libc6-compat WORKDIR /app # 安装依赖 -COPY package.json bun.lock* package-lock.json* pnpm-lock.yaml* ./ -RUN \ - if [ -f bun.lock ]; then bun install --frozen-lockfile; \ - elif [ -f package-lock.json ]; then npm ci; \ - elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \ - else echo "Lockfile not found." && exit 1; \ - fi +COPY package.json ./ +RUN npm install # 构建阶段 FROM base AS builder