fix(docker): include pnpm-workspace and npmrc in builder context
The committed lockfile records overrides from pnpm-workspace.yaml. With the narrower manifest COPY, pnpm install --frozen-lockfile ran without the workspace file and failed with ERR_PNPM_LOCKFILE_CONFIG_MISMATCH in CI. Copy package.json, pnpm-lock, pnpm-workspace and .npmrc together so the override config present in the lockfile is also supplied at install time.
This commit is contained in:
1 parent
bef1775dea
commit
3e0ba73d1c
2 files changed
+5
-2
No files matched your search
@@ -6,7 +6,7 @@ const dockerfile = readFileSync("Dockerfile", "utf8");
|
||||
describe("Docker build cache", () => {
|
||||
it("installs frozen dependencies before copying application source", () => {
|
||||
const manifests = dockerfile.indexOf(
|
||||
"COPY package.json pnpm-lock.yaml* ./",
|
||||
"COPY package.json pnpm-lock.yaml* pnpm-workspace.yaml* .npmrc* ./",
|
||||
);
|
||||
const fetch = dockerfile.indexOf("pnpm fetch --ignore-scripts");
|
||||
const install = dockerfile.indexOf("pnpm install --frozen-lockfile");
|
||||
|
||||
Reference in new issue
Block a user