ARG NOTION_PAGE_ID # Use a smaller base image # Install dependencies only when needed FROM node:20-alpine AS deps # Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. RUN apk add --update --no-cache \ libc6-compat \ make \ g++ \ jpeg-dev \ cairo-dev \ giflib-dev \ pango-dev \ libtool \ autoconf \ automake RUN npm install -g pnpm WORKDIR /app COPY package.json pnpm-lock.yaml ./ RUN pnpm install --frozen-lockfile # Rebuild the source code only when needed FROM deps AS builder ARG NOTION_PAGE_ID COPY . . RUN pnpm run build # TODO production EXPOSE 3000 # Next.js collects completely anonymous telemetry data about general usage. # Learn more here: https://nextjs.org/telemetry # Uncomment the following line in case you want to disable telemetry. # ENV NEXT_TELEMETRY_DISABLED 1 CMD ["pnpm", "start"]