oriyo_next/Dockerfile
2025-05-10 18:07:11 +05:00

32 lines
573 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 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:18-alpine AS runner
RUN corepack enable && corepack prepare pnpm@latest --activate
WORKDIR /app
COPY --from=builder /app ./
EXPOSE 3000
CMD ["pnpm", "start"]