Optimized on docker build
This commit is contained in:
parent
6dd88f897c
commit
edb39d5538
12
Dockerfile
12
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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user