Open
Description
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 my Dockerfile
:
FROM public.ecr.aws/lambda/python:3.12
COPY requirements.txt /tmp
RUN pip install -t ${LAMBDA_TASK_ROOT} -r /tmp/requirements.txt \
&& find ${LAMBDA_TASK_ROOT} -regex '^.*\(__pycache__\|\.py[co]\)$' -delete
COPY lambda_function.py ${LAMBDA_TASK_ROOT}
CMD ["lambda_function.lambda_handler"]
Looking inside the running container, it seems that other usual files are present in /usr/bin
.
Metadata
Metadata
Assignees
Labels
No labels