Skip to content

Instantly share code, notes, and snippets.

@qrkourier
Created August 21, 2023 15:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qrkourier/e9f1ab1cb4f6bcbc59232239dc0a87a5 to your computer and use it in GitHub Desktop.
Save qrkourier/e9f1ab1cb4f6bcbc59232239dc0a87a5 to your computer and use it in GitHub Desktop.
print table of Linux distros' libc versions by running a Docker container
for OS in \
oraclelinux:{7..9} \
debian:{buster,bullseye,bookworm} \
registry.access.redhat.com/ubi{8,9}/ubi \
ubuntu:{bionic,focal,jammy} \
quay.io/centos/centos:7 \
fedora:{34,35,36} \
rockylinux/rockylinux:{8,9};
do
(
set -euo pipefail;
docker pull $OS &>/dev/null;
docker run \
--rm \
--platform amd64 \
$OS \
bash -c '
printf "%s:\t%s\n" '$OS' "$(
ldd --version |& grep -Po "^ldd\s+\K.*"
)"
'
);
done \
|column -t \
|sort -Vk4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment