A GitLab pipeline to build Node.js 18.x, 20.x and 22.x for Amazon Linux 2.
Starting from 18.x, official Node.js LTS builds cannot be used on Amazon Linux 2, due to binary incompatibilities (missing glibc symbol versions).
AWS recommends to build those Node.js versions from source, when using Amazon Linux 2 (AL2).
The pipeline launches an amazonlinux:2
container and:
- Installs prerequisites
- Fetches the latest release tag for a specific Node.js major version
- Builds this release from source code
- Publishes the build to this project's package registry
Node.js 18.x, 20.x and 22.x builds for Amazon Linux 2 can be downloaded from the Package Registry.
See the ECGALAXY Node.js Ansible role to globally install Node.js on Amazon Linux 2 and other distributions, using automation.
Original code provided by AWS.
ECGALAXY team.