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