Skip to content

Commit d2ca824

Browse files
APMSVLS-212 Reducing Python Lambda Layer Size (#667)
strip -g original dockerfile typo No node version Node v 20 strip debug all strip unneeded discard all Merged main removing unnecessary files fixing diff Strip unneeded, cleaned up dockerfile update comment Co-authored-by: rithika.narayan <rithika.narayan@datadoghq.com>
1 parent af3d0e2 commit d2ca824

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,12 @@ RUN find ./python/lib/$runtime/site-packages/ddtrace -name \*.h -delete
7373
RUN find ./python/lib/$runtime/site-packages/ddtrace -name \*.hpp -delete
7474
RUN find ./python/lib/$runtime/site-packages/ddtrace -name \*.pyx -delete
7575

76-
# Strip debug symbols using strip -g for all .so files in ddtrace. This is to
76+
# Strip debug symbols and symbols that are not needed for relocation
77+
# processing using strip --strip-unneeded for all .so files. This is to
7778
# reduce the size when ddtrace is built from sources. The release wheels are
7879
# already stripped of debug symbols. We should revisit this when serverless
7980
# benchmark uses pre-built wheels instead of building from sources.
80-
RUN find ./python/lib/$runtime/site-packages/ddtrace -name "*.so" -exec strip -g {} \;
81+
RUN find ./python/lib/$runtime/site-packages -name "*.so" -exec strip --strip-unneeded {} \;
8182

8283
FROM scratch
8384
COPY --from=builder /build/python /

0 commit comments

Comments
 (0)