Rebuild the least docker layer

This commit is contained in:
Mikhail f. Shiryaev 2022-04-12 10:59:44 +02:00
parent abf8c3c5ad
commit 30a9fce67a
No known key found for this signature in database
GPG Key ID: 4B02ED204C7D93F4

View File

@ -1,13 +1,13 @@
FROM public.ecr.aws/lambda/python:3.9
# Copy function code
COPY app.py ${LAMBDA_TASK_ROOT}
# Install the function's dependencies using file requirements.txt
# from your project folder.
COPY requirements.txt .
RUN pip3 install -r requirements.txt --target "${LAMBDA_TASK_ROOT}"
# Copy function code
COPY app.py ${LAMBDA_TASK_ROOT}
# Set the CMD to your handler (could also be done as a parameter override outside of the Dockerfile)
CMD [ "app.handler" ]