fix dockerfile
Some checks failed
Docker Build / publish (push) Failing after 7s

This commit is contained in:
Lea 2025-03-01 13:57:16 +01:00
parent 4e24e30441
commit 48938ba93a
Signed by: Lea
GPG key ID: 1BAFFE8347019C42

View file

@ -6,15 +6,9 @@ FROM base AS deps
RUN apk add --no-cache libc6-compat
WORKDIR /app
# Install dependencies based on the preferred package manager
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
RUN \
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
elif [ -f package-lock.json ]; then npm ci; \
elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i --frozen-lockfile; \
else echo "Lockfile not found." && exit 1; \
fi
# Install dependencies
COPY package.json pnpm-lock.yaml ./
RUN yarn global add pnpm && pnpm i --frozen-lockfile
# Rebuild the source code only when needed
FROM base AS builder