Skip to content

Commit 724c2bd

Browse files
committed
Remove requests and all its dependencies.
1 parent ed8c462 commit 724c2bd

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Dockerfile

+8-1
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,21 @@ RUN rm -rf ./python/lib/$runtime/site-packages/botocore*
2222
RUN rm -rf ./python/lib/$runtime/site-packages/setuptools
2323
RUN rm -rf ./python/lib/$runtime/site-packages/jsonschema/tests
2424
RUN find . -name 'libddwaf.so' -delete
25-
RUN rm -rf ./python/lib/$runtime/site-packages/urllib3*
2625
RUN rm ./python/lib/$runtime/site-packages/ddtrace/appsec/_iast/_taint_tracking/*.so
2726
RUN rm ./python/lib/$runtime/site-packages/ddtrace/appsec/_iast/_stacktrace*.so
2827
RUN rm ./python/lib/$runtime/site-packages/ddtrace/internal/datadog/profiling/libdd_wrapper*.so
2928
RUN rm ./python/lib/$runtime/site-packages/ddtrace/internal/datadog/profiling/ddup/_ddup.*.so
3029
RUN rm ./python/lib/$runtime/site-packages/ddtrace/internal/datadog/profiling/stack_v2/_stack_v2.*.so
3130
RUN find . -name "*.dist-info" -type d | xargs rm -rf
3231

32+
# Remove requests and dependencies
33+
RUN rm -rf \
34+
./python/lib/$runtime/site-packages/requests* \
35+
./python/lib/$runtime/site-packages/urllib3* \
36+
./python/lib/$runtime/site-packages/certifi* \
37+
./python/lib/$runtime/site-packages/idna* \
38+
./python/lib/$runtime/site-packages/charset_normalizer*
39+
3340
# Precompile all .pyc files and remove .py files. This speeds up load time.
3441
# Compile with optimization level 2 (-OO) and PYTHONNODEBUGRANGES=1 to redtce
3542
# size of .pyc files.

0 commit comments

Comments
 (0)