Bootstrap pnpm via Corepack and pin packageManager version

Replace the npm-based pnpm bootstrap in the Docker assets stage with
Corepack (ships with Node, no npm needed) and pin the pnpm version via
package.json's packageManager field for reproducible builds.
This commit is contained in:
Claude
2026-06-14 12:48:30 +00:00
parent 0b7ddc260f
commit 263299ca52
2 changed files with 4 additions and 1 deletions
+3 -1
View File
@@ -26,7 +26,9 @@ FROM node:22-bookworm-slim AS assets
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN npm install -g pnpm && pnpm install --frozen-lockfile --ignore-scripts
# Corepack ships with Node and activates the pnpm version pinned in
# package.json's "packageManager" field — no npm bootstrap needed.
RUN corepack enable && pnpm install --frozen-lockfile --ignore-scripts
COPY . .
COPY --from=builder /home/timetracker/app/ts/generated ./ts/generated
RUN pnpm tailwindcss -i ./common/input.css -o ./games/static/base.css \