fix(docker): enforce Node version alignment across build stages
CI / check (push) Failing after 53s
CI / deploy (push) Skipped
CI / publish-container (push) Skipped

This commit is contained in:
Simo committed 2026-09-11 00:11:18 +02:00
1 parent bcefb0f8ff
commit fec8dd3c5d
2 files changed
+19 -2

No files matched your search

+17
View File
@@ -28,6 +28,23 @@ assert.equal(
"@types/node must match the pinned Node.js major",
);
const nodeImages = [
...readProjectFile("Dockerfile").matchAll(
/^FROM\s+(?:--platform=\S+\s+)?node:([^\s]+)\s*/gim,
),
].map((match) => match[1]);
assert.ok(
nodeImages.length > 0,
"Dockerfile must declare a pinned Node.js base image",
);
for (const image of nodeImages) {
assert.equal(
image,
`${pinnedVersion}-alpine`,
"every Docker Node.js stage must match .nvmrc",
);
}
if (!process.argv.includes("--static")) {
assert.equal(
process.versions.node,