Skip to content

chore(build): strip debug symbols using strip -g #652

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Aug 20, 2025
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,11 @@ RUN find ./python/lib/$runtime/site-packages/ddtrace -name \*.h -delete
RUN find ./python/lib/$runtime/site-packages/ddtrace -name \*.hpp -delete
RUN find ./python/lib/$runtime/site-packages/ddtrace -name \*.pyx -delete

# Strip debug symbols using strip -g for all .so files in ddtrace. This is to
# reduce the size when ddtrace is built from sources. The release wheels are
# already stripped of debug symbols. We should revisit this when serverless
# benchmark uses pre-built wheels instead of building from sources.
RUN find ./python/lib/$runtime/site-packages/ddtrace -name "*.so" -exec strip -g {} \;

FROM scratch
COPY --from=builder /build/python /
Loading