diff --git a/Dockerfile b/Dockerfile index 194308c..6da2e9e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ # Install dependencies based on the preferred package manager COPY bookie/package.json bookie/yarn.lock* bookie/package-lock.json* bookie/pnpm-lock.yaml* ./ RUN \ - if [ -f yarn.lock ]; then yarn --frozen-lockfile; \ + if [ -f yarn.lock ]; then corepack enable yarn && yarn --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; \ @@ -23,7 +23,7 @@ COPY --from=deps /app/node_modules ./node_modules COPY /bookie ./ RUN \ - if [ -f yarn.lock ]; then yarn run build; \ + if [ -f yarn.lock ]; then corepack enable yarn && yarn run build; \ elif [ -f package-lock.json ]; then npm run build; \ elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build; \ else echo "Lockfile not found." && exit 1; \