From edb39d553847c9d488b404f6cdeed4869eb4a11d Mon Sep 17 00:00:00 2001 From: Umar Adilov <99314948+adilovcode@users.noreply.github.com> Date: Sat, 10 May 2025 18:07:11 +0500 Subject: [PATCH] Optimized on docker build --- Dockerfile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e0cee13..e7770b2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,10 +7,18 @@ RUN corepack enable && corepack prepare pnpm@latest --activate ENV CI=true WORKDIR /app + +# Copy package.json and pnpm-lock.yaml first for caching +COPY package.json pnpm-lock.yaml ./ + +# Install dependencies +RUN pnpm install + +# Copy the rest of the files COPY . . -# Install dependencies and build -RUN pnpm install && pnpm build +# Build the application +RUN pnpm build FROM node:18-alpine AS runner