Shared library locations from executable, to copy for Docker multi-stage build
ldd is a partial solution: https://stackoverflow.com/a/63663617
I am trying to build a small Docker image from a large one. So I build my Rust project and COPY --from=stage0 into my distroless (also tried FROM scratch). Which gives me a bunch of errors indicating missing shared libraries.
How do I automatically copy over all the necessary libraries?