-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
User Story
As a software developer,
I want to upgrade the Node.js base image in the frontend/Dockerfile from version 14 to 18 LTS
so that the application benefits from active security patches, modern ECMAScript features, and long-term support.
Background
- Node.js 14 reached end-of-life (EOL) on April 30, 2023, leaving the application exposed to unpatched security vulnerabilities and compatibility issues with newer dependencies.
- The current
frontend/DockerfilespecifiesFROM node:14, which is outdated. Risks include potential breaches due to unpatched CVEs and inability to use modern JavaScript syntax (e.g., optional chaining, private class fields) supported in Node 18. - The React frontend uses
react-scripts 4.0.3, which is compatible with Node 18, but the outdated Docker image prevents leveraging performance improvements and language features.
Acceptance Criteria
- Modify
frontend/Dockerfileto useFROM node:18as the base image. - Verify the frontend application builds and runs without errors using
docker-compose up --build. - Confirm the React app successfully fetches and displays data from the backend API endpoint (
http://0.0.0.0:80/). - Ensure no warnings or errors related to Node.js version mismatches appear during
npm installor container startup. - Validate that all existing functionality (e.g., UI rendering, API calls) remains unchanged post-upgrade.