Shared library locations from executable, to copy for Docker multi-stage build
02:42 18 Jun 2024

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?

docker shared-libraries linker-errors ldd docker-multi-stage-build