Skip to content
This repository was archived by the owner on Apr 5, 2025. It is now read-only.

Commit 4f73442

Browse files
committed
chore: document python Dockerfile
1 parent 1cee2fd commit 4f73442

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

layer/Python/Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,15 @@ RUN pip install -t /asset/python aws-lambda-powertools$PACKAGE_SUFFIX
1616

1717
# Removing nonessential files
1818
RUN cd /asset && \
19+
# remove boto3 and botocore (already available in Lambda Runtime)
1920
rm -rf python/boto* && \
2021
# remove debugging symbols
2122
find python -name '*.so' -type f -exec strip "{}" \; && \
23+
# remove tests
2224
find python -wholename "*/tests/*" -type f -delete && \
25+
# remove python bytecode
2326
find python -regex '^.*\(__pycache__\|\.py[co]\)$' -delete && \
27+
# zip layer
2428
zip -r9 aws-lambda-powertools.zip ./python && \
29+
# delete original
2530
rm -rf ./python

0 commit comments

Comments
 (0)