The ldd looks for the libraries that haproxy depends on, among which, libc.so.6. The awk command reformats the output of ldd and produces, among other libraries:
lib/x86_64-linux-gnu/libc.so.6
Those files are then passed to dpkg-query to find their owning package. And this is where the issue is coming from:
The issue is that the library we are interested in happens to also be a substring of a GDB pretty-printing script that is obviously not needed at runtime by haproxy.
See https://github.com/docker-library/python/pull/858
The issue comes from the logic that aims at removing the packages that were needed to build
haproxy
but which are not needed at runtime anymore.The
ldd
looks for the libraries thathaproxy
depends on, among which,libc.so.6
. Theawk
command reformats the output ofldd
and produces, among other libraries:Those files are then passed to
dpkg-query
to find their owning package. And this is where the issue is coming from:The issue is that the library we are interested in happens to also be a substring of a GDB pretty-printing script that is obviously not needed at runtime by
haproxy
.