From f01794fed8167c65218b1d2a04fe0ed2df0fbbad Mon Sep 17 00:00:00 2001 From: Tiago Ribeiro Date: Fri, 21 Jul 2023 10:29:06 +0100 Subject: [PATCH] Updated the Dockerfile --- Dockerfile | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7f219012..bee87c3d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,13 +8,8 @@ RUN apk add --no-cache libc6-compat WORKDIR /app # Install dependencies based on the preferred package manager -COPY --link 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 +COPY package.json yarn.lock* ./ +RUN yarn --frozen-lockfile # Rebuild the source code only when needed