
This allows us to easily switch between container registries while keeping the same domain prefix. It also gives access to high-level statistics on the docker pull which can be useful to find out which images are being used or not.
18 lines
417 B
Bash
Executable file
18 lines
417 B
Bash
Executable file
#!/usr/bin/env bash
|
|
#
|
|
# Usage: ./dockerhub-image-matrix
|
|
set -euo pipefail
|
|
|
|
## Main ##
|
|
|
|
releases_json=$(nix-instantiate --strict --eval --json)
|
|
|
|
echo "| Image / Tag | Pull |"
|
|
echo "| --- | --- |"
|
|
|
|
for attr in $(echo "$releases_json" | jq -r "keys[]") ; do
|
|
name=nixpkgs/$attr
|
|
echo -n "| [$name](https://hub.docker.com/r/$name)"
|
|
echo -n "| \`docker pull docker.nix-community.org/$name\` "
|
|
echo "|"
|
|
done
|