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
|
ENV CI=true
|
||||||
|
|
||||||
WORKDIR /app
|
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 . .
|
COPY . .
|
||||||
|
|
||||||
# Install dependencies and build
|
# Build the application
|
||||||
RUN pnpm install && pnpm build
|
RUN pnpm build
|
||||||
|
|
||||||
FROM node:18-alpine AS runner
|
FROM node:18-alpine AS runner
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user