Cannot install NPM Serverless on aws-cli docker image due to old GLIBC version
Describe the bug
We're using aws-cli Docker image as our base for our deployment pipeline. We are setting up one new service using Node 22 and Serverless 4.14.3, and within the deployment when we reach the installation part for Serverless it fails with:
$ npm install -g [email protected]
node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node)
node: /lib64/libc.so.6: version `GLIBC_2.27' not found (required by node)
node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by node)
I've managed to trace it back to the base image for aws-cli which is public.ecr.aws/amazonlinux/amazonlinux:2 which uses GLIB 2.26. I'm not sure if perhaps there is a tag that uses amazonlinux:2023 as a base instead or if an update for the current Dockerfile is due
Regression Issue
- [ ] Select this option if this issue appears to be a regression.
Expected Behavior
That the latest version of Serverless is installable using the latest NodeLTS
Current Behavior
Installing serverless errors out
$ npm install -g [email protected]
node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node)
node: /lib64/libc.so.6: version `GLIBC_2.27' not found (required by node)
node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by node)
Reproduction Steps
Try to install npm serverless +4 with Node +18 within aws-cli docker image
Possible Solution
Upgrade base image from the Dockerfile to AWS Linux Runtime 2023 amazonlinux:2023
FROM public.ecr.aws/amazonlinux/amazonlinux:2023 as installer
Additional Information/Context
No response
CLI version used
latest docker tag
Environment details (OS name and version, etc.)
docker image
Hello @Davidhervil, thanks for reaching out. We the CLI team are aware and we are making a new image because we will still support amazonlinux:2 until its end of life. We don't have an ETA at this point in time but please refer to an SDK or AWS CLI changelog for updates about this going forward https://raw.githubusercontent.com/aws/aws-cli/v2/CHANGELOG.rst . If you have any questions, please do let me know. Thanks.
Greetings! It looks like this issue hasn’t been active in longer than five days. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one.
We're working on moving to Amazon Linux 2023 via https://github.com/aws/aws-cli/issues/9508 if you want to track over there.
Please see: Announcement: Changes to AWS CLI Docker image [AWS CLI v2 only] https://github.com/aws/aws-cli/issues/9586
This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.