Skip to content

Cannot install NPM Serverless on aws-cli docker image due to old GLIBC version #9495

Open
@Davidhervil

Description

@Davidhervil

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

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.dockerIssue involves the AWS CLI Docker container imagep3This is a minor priority issueresponse-requestedWaiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions