1개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
0
to install python modules, use empty LD_LIBRARY_PATH environment variable:
FROM public.ecr.aws/lambda/nodejs:20
RUN dnf upgrade -y
########## CUSTOM ######################
RUN dnf install -y \
python3 \
&& \
dnf clean all
########## NODE ######################
RUN npm install -g esbuild yarn typescript && \
npm cache clean --force
# ########## AWS SAM ######################
RUN LD_LIBRARY_PATH="" pip3 install --no-cache-dir --upgrade awscli aws-sam-cli
To confirm CLI and SAM were working, docker exec -it <containerid> sh
into a running container, and my aws --version
command failed with urllib3 not finding ssl, but I noticed that my shell had LD_LIBRARY_PATH=/var/lang/lib:/lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib:/opt/lib
- setting LD_LIBRARY_PATH=""
in my shell let me successfully run CLI and SAM from the shell to check their versions:
sh-5.2# LD_LIBRARY_PATH=""
sh-5.2# aws --version
aws-cli/1.30.3 Python/3.9.16 Linux/6.3.13-linuxkit botocore/1.32.3
sh-5.2# sam --version
SAM CLI, version 1.103.0
답변함 6달 전
관련 콘텐츠
- AWS 공식업데이트됨 4달 전
- AWS 공식업데이트됨 2년 전
Thanks for your comment, emptying
LD_LIBRARY_PATH
did help.