Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ FROM node:${NODE_IMAGE_VERSION} AS deps
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN npm install -g pnpm
# pnpm version pinned at 10 due to ERR_PNPM_IGNORED_BUILDS error with v11
RUN npm install -g pnpm@10

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 pnpm@10 is a major-version range, not an exact pin — it will silently float to any 10.x.y release published after the image is built. Two builds at different times can pick up different pnpm versions, making the build non-reproducible. Pin to a full pnpm@10.x.y semver (e.g. the latest stable 10.x at the time of merging) and update both occurrences in the file to keep them in sync.

RUN pnpm install --frozen-lockfile

# Rebuild the source code only when needed
Expand Down Expand Up @@ -37,9 +38,10 @@ ENV NODE_OPTIONS=$NODE_OPTIONS

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
# pnpm version pinned at 10 due to ERR_PNPM_IGNORED_BUILDS error with v11
RUN set -x \
&& apk add --no-cache curl \
&& npm install -g pnpm
&& npm install -g pnpm@10

# Script dependencies
RUN pnpm --allow-build='@prisma/engines' add npm-run-all dotenv chalk semver \
Expand Down