current trixie does not have yarn

This commit is contained in:
2026-08-31 06:41:31 +00:00
parent 4e1c0d1ec7
commit 67209886b9
+3 -3
View File
@@ -1,4 +1,4 @@
FROM node:current-trixie-slim AS base FROM node:lts-trixie-slim AS base
# Install dependencies only when needed # Install dependencies only when needed
FROM base AS deps FROM base AS deps
@@ -11,7 +11,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
# Install dependencies based on the preferred package manager # Install dependencies based on the preferred package manager
COPY bookie/package.json bookie/yarn.lock* bookie/package-lock.json* bookie/pnpm-lock.yaml* ./ COPY bookie/package.json bookie/yarn.lock* bookie/package-lock.json* bookie/pnpm-lock.yaml* ./
RUN \ RUN \
if [ -f yarn.lock ]; then corepack enable yarn && yarn --frozen-lockfile; \ if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
elif [ -f package-lock.json ]; then npm ci; \ elif [ -f package-lock.json ]; then npm ci; \
elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \ elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \
else echo "Lockfile not found." && exit 1; \ else echo "Lockfile not found." && exit 1; \
@@ -23,7 +23,7 @@ COPY --from=deps /app/node_modules ./node_modules
COPY /bookie ./ COPY /bookie ./
RUN \ RUN \
if [ -f yarn.lock ]; then corepack enable yarn && yarn run build; \ if [ -f yarn.lock ]; then yarn run build; \
elif [ -f package-lock.json ]; then npm run build; \ elif [ -f package-lock.json ]; then npm run build; \
elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build; \ elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build; \
else echo "Lockfile not found." && exit 1; \ else echo "Lockfile not found." && exit 1; \