oriyo_next/Dockerfile
2025-12-17 14:05:27 +05:00

32 lines
573 B
Docker

FROM node:20-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 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 . .
# Build the application
RUN pnpm build
FROM node:20-alpine AS runner
RUN corepack enable && corepack prepare pnpm@latest --activate
WORKDIR /app
COPY --from=builder /app ./
EXPOSE 3000
CMD ["pnpm", "start"]