aws / aws-lambda-base-images

Apache License 2.0
669 stars 110 forks source link

aws-lambda-nodejs /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node) #74

Closed LewisSmallwood closed 1 year ago

LewisSmallwood commented 1 year ago

Hi there, I am experiencing an issue with (what I believe to be) the new amazon/aws-lambda-nodejs:16 docker image.

When running my Dockerfile:

FROM amazon/aws-lambda-nodejs:16

ARG AWS_ACCESS_KEY_ID
ARG AWS_SECRET_ACCESS_KEY
ARG AWS_REGION=us-east-1

ENV AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \
    AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \
    AWS_REGION=$AWS_REGION

COPY .env package*.json ${LAMBDA_TASK_ROOT}/
COPY src/ ${LAMBDA_TASK_ROOT}/src/

RUN npm install

CMD [ "src/lambda/get-external-statistics.handler" ]

I get the error:

#7 [3/4] COPY src/ /var/task/src/
#7 sha256:32d15ee8e63b6b1f066b1de6fb5a3b4df8c68e5d816ffb3610401147425bd1bf
#7 DONE 0.0s

#8 [4/4] RUN npm install
#8 sha256:27653e4b340ef0d26d775fa6e1ed5107b0a8217a6ae269d7fe4a04dcdab4ee6d
#8 32.90 npm notice 
#8 32.90 npm notice New major version of npm available! 8.19.2 -> 9.2.0
#8 32.90 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.2.0>
#8 32.90 npm notice Run `npm install -g npm@9.2.0` to update!
#8 32.90 npm notice 
#8 32.90 npm ERR! code 1
#8 32.90 npm ERR! path /var/task/node_modules/mongodb-memory-server
#8 32.90 npm ERR! command failed
#8 32.90 npm ERR! command sh -c -- node ./postinstall.js
#8 32.90 npm ERR! node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node)
#8 32.90 npm ERR! node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by node)
#8 32.90 
#8 32.90 npm ERR! A complete log of this run can be found in:
#8 32.90 npm ERR!     /root/.npm/_logs/2023-01-04T10_48_25_975Z-debug-0.log
#8 ERROR: executor failed running [/bin/sh -c npm install]: exit code: 1

Any help would be greatly appreciated.

LewisSmallwood commented 1 year ago

Is this a similar issue to #5