Skip to content

Upgrade Node.js to 18 LTS in frontend Dockerfile #3

@chigwell

Description

@chigwell

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/Dockerfile specifies FROM 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/Dockerfile to use FROM node:18 as 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 install or container startup.
  • Validate that all existing functionality (e.g., UI rendering, API calls) remains unchanged post-upgrade.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions