Revert "Upgraded node version in docker file"#737
Conversation
This reverts commit e97f156.
WalkthroughThe Dockerfile's build stage base image version is downgraded from Node.js 18-alpine to Node.js 14.17-alpine. This single-line change modifies the build environment and associated toolchain, without altering the overall build process or subsequent stages. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@Dockerfile`:
- Line 2: Update the Docker build base in the Dockerfile by replacing the EOL
image tag on the FROM line (currently "FROM node:14.17-alpine") with a supported
LTS major (e.g., node:20-alpine or node:22-alpine) and rebuild the multi-stage
"build" stage accordingly; then align the CI matrix variable "node-version" in
.github/workflows/master.yml and .github/workflows/tags.yml to the same
supported LTS major (e.g., 20 or 22) so the Docker build and test matrices are
consistent and do not pin to EOL Node versions.
| @@ -1,5 +1,5 @@ | |||
| # Build Production Console in Node | |||
| FROM node:18-alpine as build | |||
| FROM node:14.17-alpine as build | |||
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== Node/version declarations in repo =="
fd -HI '^(package(-lock)?\.json|\.nvmrc|\.node-version|Dockerfile)$' \
-x sh -c 'printf "\n--- %s ---\n" "$1"; sed -n "1,220p" "$1"' sh {}
echo
echo "== CI/workflow references to Node versions =="
rg -n -C2 --glob '**/*.{yml,yaml,json}' '(node-version|setup-node|FROM node:|\"engines\"|lockfileVersion)'Repository: jembi/openhim-console
Length of output: 11851
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== CI/Workflow files in repo =="
fd -HI '\.yml$|\.yaml$|ci\.|github' | head -20
echo
echo "== Searching for Node version references in CI files =="
find . -name "*.yml" -o -name "*.yaml" | xargs grep -l "node" 2>/dev/null | head -10
echo
echo "== Content of .github/workflows if exists =="
find .github/workflows -name "*.yml" -o -name "*.yaml" 2>/dev/null | head -5 | xargs cat 2>/dev/nullRepository: jembi/openhim-console
Length of output: 3892
🌐 Web query:
Node.js release schedule LTS timeline Node 14 18 22 end of life dates
💡 Result:
Node.js LTS lifecycle (how the schedule works)
- New even-numbered majors ship in April, then enter LTS in October, then move to Maintenance LTS, and finally reach End-of-Life (EOL) on a predictable cadence. [1]
LTS timeline & EOL dates (Node 14 / 18 / 22)
| Major | Codename | Initial release | LTS starts | Maintenance LTS starts | EOL |
|---|---|---|---|---|---|
| 14.x | Fermium | 2020-04-21 | 2020-10-27 | 2021-10-19 | 2023-04-30 |
| 18.x | Hydrogen | 2022-04-19 | 2022-10-25 | 2023-10-18 | 2025-04-30 |
| 22.x | Jod | 2024-04-24 | 2024-10-29 | 2025-10-21 | 2027-04-30 |
Sources
- [1] Node.js Release Working Group — release schedule table (nodejs/Release). (github.com)
Citations:
Avoid reverting the builder to an EOL Node line.
node:14.17-alpine moves the build back to Node 14, which reached End-of-Life on April 30, 2023. Node 18 is also now EOL as of April 30, 2025, so reverting still leaves the build on an unsupported toolchain. The Node.js release guidance recommends production apps use only Active or Maintenance LTS lines.
Additionally, the CI workflows in .github/workflows/master.yml and .github/workflows/tags.yml pin the Docker build matrix to node-version: [14.x], while the test workflow simultaneously tests against 16.x, 18.x, and latest—this inconsistency should be resolved. If PR #736 exposed a compatibility issue, pin to a currently supported LTS major (Node 20 through April 2026, or Node 22 for longer-term stability) instead of reverting to Node 14.
Suggested change
-FROM node:14.17-alpine as build
+FROM node:22-alpine as build📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| FROM node:14.17-alpine as build | |
| FROM node:22-alpine as build |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@Dockerfile` at line 2, Update the Docker build base in the Dockerfile by
replacing the EOL image tag on the FROM line (currently "FROM
node:14.17-alpine") with a supported LTS major (e.g., node:20-alpine or
node:22-alpine) and rebuild the multi-stage "build" stage accordingly; then
align the CI matrix variable "node-version" in .github/workflows/master.yml and
.github/workflows/tags.yml to the same supported LTS major (e.g., 20 or 22) so
the Docker build and test matrices are consistent and do not pin to EOL Node
versions.
Reverts #736
Summary by CodeRabbit