chore: target Docker image at node:22-alpine (LTS)#221
Merged
Conversation
The Dockerfile pinned node:18-alpine, which is below the package.json engines floor (>=20.0.0). Bump both build and production stages to node:22-alpine — the active LTS line and a version exercised by the CI matrix (20/22/24) — rather than the non-LTS node:26 proposed by the dependabot PR (#219), which CI does not build or run. Also sync the stale README references (badge + prerequisites) from Node 18 to Node 20 to match engines. Verified with a local multi-stage `docker build`: image builds, runs node v22.x, and produces dist/index.js.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Supersedes #219.
#219 (dependabot) bumped the Docker base image from
node:18-alpinestraight tonode:26-alpine. Moving off 18 is correct — it's below thepackage.jsonenginesfloor (>=20.0.0) — but node:26 is non-LTS, and the CI workflow never builds or runs the Docker image (the matrix only covers Node 20/22/24), so a green check on #219 proves nothing about the image.This PR instead targets
node:22-alpine(active LTS, and in the CI matrix) for both the build and production stages, and syncs the stale README Node references (badge + prerequisites: 18 → 20) to matchengines.Verification
Local multi-stage
docker build(which CI does not do):node v22.xdist/index.jsNote (out of scope)
There is no
.dockerignore, soCOPY . .copies the localnode_modulesinto the build context. Worth adding separately, but left out of this change to keep it focused on the Node version.