oriyo_next/Dockerfile
Umar Adilov fcca7e8329 WIP
2026-06-01 23:26:17 +05:00

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