Repository navigation
docker: Node and pnpm in an image, so a host needs Go and Docker - #122
Merged
Merged
Conversation
The install, the build and the dev server run in the image the Dockerfile makes, at the Node versions.yaml pins, instead of whatever Node the host has. The install still goes through Socket Firewall: the image builds go-tools' sfw at the version go.mod pins and runs pnpm through it. CI runs the same tasks and no longer installs Node or pnpm. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Today a host builds the site with its own Node, and one older than CI's fails. This moves Node and pnpm into an image, the way the blog does it:
Dockerfile: adepsstage (the install), abuildstage and adiststage thatdocker build --outputwrites todist/. The images are pinned by digest inversions.yaml(node,golang) and handed in withversions args, as the versions gate asks.sfwat the versiongo.modpins, and the install runs assfw pnpm install --frozen-lockfile(checked: pnpm runs with the firewall's proxy and CA). pnpm comes from corepack atpackageManager's version. No store cache, for the reason the workflow gave.GITHUB_TOKENreaches sfw as a build secret, in no layer.node --test 'src/lib/*.test.mjs') beforepnpm build, since the host has no Node to run them.task devmounts the source and runs as the host's user, withnode_modulesfrom the image.task buildruns the build stage..gitgoes into the build: each page's "Last updated" is read from it.go tool taskstays the entry point, and Go stays on the host (refgen builds spin's CLI there).sfw check,taskgateand every other check run as before.pnpm/action-setupandsetup-node, and runs the same tasks.go tool task checkpasses.First of three stacked PRs: lint (Biome +
astro check) and Cloudflare Pages build on this one.🤖 Generated with Claude Code