Fix dockerfile
Some checks failed
Main / build-and-push-docker-image (20.x) (push) Failing after 3m27s

This commit is contained in:
2025-12-05 18:16:33 -05:00
parent 13626642c9
commit c5d0278491

View File

@@ -8,10 +8,16 @@ FROM base AS deps
RUN apk add --no-cache libc6-compat
WORKDIR /app
# Enable Corepack
RUN corepack enable
# Set Yarn to the latest stable version
RUN yarn set version stable
# Install dependencies based on the preferred package manager
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* .npmrc* ./
RUN \
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
if [ -f yarn.lock ]; then yarn install --immutable; \
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; \