Files
at-mintel/packages/infra/docker/Dockerfile.nextjs
Marc Mintel a8bc039c02
All checks were successful
Monorepo Pipeline / 🧪 Quality Assurance (push) Successful in 2m33s
Monorepo Pipeline / 🚀 Release (push) Has been skipped
Monorepo Pipeline / 🐳 Build & Push Images (push) Has been skipped
feat: implement centralized Docker base-image strategy and automate registry pushes
2026-02-03 11:50:17 +01:00

25 lines
632 B
Docker

FROM node:20-alpine AS base
RUN apk add --no-cache libc6-compat curl
WORKDIR /app
# Enable pnpm
RUN corepack enable pnpm
# Copy root configurations
COPY pnpm-lock.yaml pnpm-workspace.yaml package.json .npmrc* ./
# Copy all package.json files to allow pnpm install to be cached
COPY packages/*/package.json ./packages/
COPY apps/*/package.json ./apps/
# Install dependencies for the entire monorepo
RUN --mount=type=cache,target=/root/.local/share/pnpm/store/v3 \
pnpm i --frozen-lockfile
# Copy the rest of the source code
COPY . .
# Post-install/Build shared packages if needed
RUN pnpm -r build --filter="./packages/*"