Skip to content

Instantly share code, notes, and snippets.

View benjaminSchilling33's full-sized avatar

b15g // Benjamin Schilling benjaminSchilling33

View GitHub Profile
@achetronic
achetronic / get-docker-image-tag-by-sha.sh
Created July 2, 2022 19:19
Find the tag of a Docker image having only the SHA256
#!/bin/bash
SHA256_HASH="5bb4faffc8b35e2702b2ffa78e982b979d7b66db29bd55b0c58de8fa745df661"
for i in {1..1000}
do
echo "Looking into page: $i"
curl "https://registry.hub.docker.com/v2/repositories/apache/superset/tags/?page=$i" \
| jq '.results[] | select(.["images"][]["digest"] == "sha256:'${SHA256_HASH}'")'