fix: dockerfile errors

This commit is contained in:
Elie Baier 2023-12-04 14:30:35 +01:00
parent 8929fd050d
commit 8f572ed10c
1 changed files with 2 additions and 4 deletions

View File

@ -1,11 +1,9 @@
FROM node:18-alpine AS deps
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY .npmrc package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
COPY package.json package-lock.json* ./
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; \
if [ -f package-lock.json ]; then npm ci; \
else echo "Lockfile not found." && exit 1; \
fi