Skip to content

fix(docker): pin pnpm to the packageManager version - #270

Merged
vigneshrajsb merged 2 commits into
mainfrom
pin-pnpm-in-dockerfile
Oct 26, 2026
Merged

vigneshrajsb merged 2 commits into
mainfrom
pin-pnpm-in-dockerfile

Conversation

@vigneshrajsb

@vigneshrajsb vigneshrajsb commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The images installed whatever pnpm was latest (npm install pnpm --global) even though package.json pins packageManager: pnpm@9.15.0. A newer global pnpm only works by downloading and switching to 9.15.0 at run time, and logs that it ignored pnpm.overrides.

Changes

  • Dockerfile, app.Dockerfile, base.Dockerfile: pin pnpm with ARG PNPM_VERSION=9.15.0 (matches packageManager in package.json; keep them in sync).
  • app.Dockerfile installs it too, so the result doesn't depend on the pnpm already in the published base image.

Verification

  • Built the unpinned image and the pinned one (--target packages). In both, node_modules/.pnpm matches pnpm-lock.yaml for every override target (@kubernetes/client-node 0.22.3, form-data 2.5.6, qs 6.16.1, micromatch 4.0.8, yaml 2.9.1, postcss 8.5.31). So the overrides were already applied at install time.
  • The pinned image reports pnpm 9.15.0 globally; the unpinned one reported 12.15.0 globally and switched to 9.15.0 inside /app.
  • pnpm lint and pnpm build pass on Node 22. pnpm ts-check and one build.test.ts test fail identically on unmodified main.
  • app.Dockerfile was not built, because its base image is pulled from a registry. It uses the same install line as Dockerfile.

@vigneshrajsb
vigneshrajsb marked this pull request as ready for review October 26, 2026 16:20
@vigneshrajsb
vigneshrajsb requested a review from a team as a code owner October 26, 2026 16:20
@vigneshrajsb
vigneshrajsb merged commit 75a0f68 into main Oct 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant