How to COPY library files between stages of a multi-stage Docker build while preserving symlinks?
问题 I have a Dockerfile which is split into a two-stage multi-stage docker build. The first stage generates a basic gcc build environment in which a number of C and C++ library are compiled. The second stage uses the COPY --from= command to copy the library files from the first stages /usr/local/lib/libproto* to the current image's. The problem I am seeing is that the first image contains symlinks from a generic library file name to a specific versioned file name. AFAIK this is common practice