Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save sub314xxl/b4b60b8cb6d494e3145b12beedb67a48 to your computer and use it in GitHub Desktop.

Select an option

Save sub314xxl/b4b60b8cb6d494e3145b12beedb67a48 to your computer and use it in GitHub Desktop.

Revisions

  1. @achetronic achetronic created this gist Jul 2, 2022.
    11 changes: 11 additions & 0 deletions get-docker-image-tag-by-sha.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    #!/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}'")'
    done