Skip to content

chore: target Docker image at node:22-alpine (LTS)#221

Merged
freema merged 1 commit into
mainfrom
chore/dockerfile-node-22-lts
Jun 17, 2026
Merged

chore: target Docker image at node:22-alpine (LTS)#221
freema merged 1 commit into
mainfrom
chore/dockerfile-node-22-lts

Conversation

@freema

@freema freema commented Jun 16, 2026

Copy link
Copy Markdown
Owner

Supersedes #219.

#219 (dependabot) bumped the Docker base image from node:18-alpine straight to node:26-alpine. Moving off 18 is correct — it's below the package.json engines floor (>=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 match engines.

Verification

Local multi-stage docker build (which CI does not do):

  • ✅ image builds end-to-end
  • ✅ runs node v22.x
  • ✅ produces dist/index.js

Note (out of scope)

There is no .dockerignore, so COPY . . copies the local node_modules into the build context. Worth adding separately, but left out of this change to keep it focused on the Node version.

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

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@freema
freema merged commit 8886b0d into main Jun 17, 2026
5 checks passed
@freema
freema deleted the chore/dockerfile-node-22-lts branch June 17, 2026 07:52
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