Skip to content

Instantly share code, notes, and snippets.

@snay2
Created May 13, 2022 14:40
Show Gist options
  • Save snay2/95043474ca87b2d72387e1503e6028f8 to your computer and use it in GitHub Desktop.
Save snay2/95043474ca87b2d72387e1503e6028f8 to your computer and use it in GitHub Desktop.
Fetch the SHA-256 hashes for specific versions of `kind` images
#!/bin/bash
set -euo pipefail
# Grab the latest versions of the k8s versions you want to support, and put them in this array
# https://hub.docker.com/r/kindest/node/tags
versions=("1.19.16" "1.20.15" "1.21.12" "1.22.9" "1.23.6" "1.24.0")
# Extract the SHA-256 hash for each version
for i in "${!versions[@]}"; do
version=${versions[$i]}
echo $version
docker pull "kindest/node:v$version"
docker inspect "kindest/node:v$version" | jq ".[0].RepoDigests[0]"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment