Forked from achetronic/get-docker-image-tag-by-sha.sh
Last active
October 24, 2024 08:06
-
-
Save LvargaDS/43468595ff56c1e54dde10c5fbf316fe to your computer and use it in GitHub Desktop.
Find the tag of a Docker image having only the SHA256
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SHA256_HASH="1bcc4a809b5dae81ccdd292bc7724ef2a1357f58a545fbdfd3076008af14d0d7" | |
for i in {1..1000} | |
do | |
URL="https://registry.hub.docker.com/v2/repositories/apache/superset/tags/?page=$i&page_size=100" | |
echo "Looking into page: $i $URL" | |
curl --silent --show-error "$URL" \ | |
| grep "${SHA256_HASH}" | |
#| jq '.results[] | select(.["images"][]["digest"] == "sha256:'${SHA256_HASH}'")' | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment