24 lines
433 B
Docker
24 lines
433 B
Docker
FROM node:18-alpine AS builder
|
|
|
|
# Enable corepack and install pnpm
|
|
RUN corepack enable && corepack prepare pnpm@latest --activate
|
|
|
|
# Disable interactive prompts
|
|
ENV CI=true
|
|
|
|
WORKDIR /app
|
|
COPY . .
|
|
|
|
# Install dependencies and build
|
|
RUN pnpm install && pnpm build
|
|
|
|
FROM node:18-alpine AS runner
|
|
|
|
RUN corepack enable && corepack prepare pnpm@latest --activate
|
|
|
|
WORKDIR /app
|
|
COPY --from=builder /app ./
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD ["pnpm", "start"] |