The haproxy docker images are containing some *-dev packages:
$ docker run --rm -it --user 0 --entrypoint /usr/bin/bash haproxy:2.4.25
root@f6106d13cb42:/# apt search -- -dev
Sorting... Done
Full Text Search... Done
dpkg/now 1.21.22 amd64 [installed,local]
Debian package management system
libc-dev-bin/now 2.36-9+deb12u4 amd64 [installed,local]
GNU C Library: Development binaries
libc6-dev/now 2.36-9+deb12u4 amd64 [installed,local]
GNU C Library: Development Libraries and Header Files
libcrypt-dev/now 1:4.4.33-2 amd64 [installed,local]
libcrypt development files
libnsl-dev/now 1.3.0-2 amd64 [installed,local]
libnsl development files
libtirpc-dev/now 1.3.3+ds-1 amd64 [installed,local]
transport-independent RPC library - development files
linux-libc-dev/now 6.1.76-1 amd64 [installed,local]
Linux support headers for userspace development
Whereas those packages are needed to build haproxy, they contain only header files and static libraries which are useless at runtime.
Hence, they shouldn’t be shipped in the final image.
The
haproxy
docker images are containing some*-dev
packages:Whereas those packages are needed to build
haproxy
, they contain only header files and static libraries which are useless at runtime. Hence, they shouldn’t be shipped in the final image.