Open tlinhart opened 1 month ago
Hi @tlinhart! Good to see you here dude! I ran into this same issue like 1 hour ago and was trying to understand what's going on. Up until Python 3.11 Runtime, Lambda images are using Amazon Linux 2 which comes with the findutils
package by default, but starting from Python 3.12 it is using Amazon Linux 2023 and it seems that the findutils
package is not installed by default.
➜ docker run --rm -it --entrypoint bash public.ecr.aws/lambda/python:3.11
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
bash-4.2# rpm -qa | grep find
findutils-4.5.11-6.amzn2.x86_64
bash-4.2#
➜ docker run --rm -it --entrypoint bash public.ecr.aws/lambda/python:3.12
bash-5.2# rpm -qa |grep find
bash-5.2#
To solve this problem you can install findutils
package in your image, add this line RUN dnf install -y findutils
before the pip install
line and you'll be able to use the find command.
Hey @leandrodamascena! I was a bit surprised that find
was not present to be honest :-) Anyway, thanks for your suggestion, will give it a try.
I'm trying to decrease my Docker image size by cleaning the cache files after installing the requirements but the build fails due to a missing
find
command. This is myDockerfile
:Looking inside the running container, it seems that other usual files are present in
/usr/bin
.