Last active
October 23, 2024 21:43
-
-
Save MParvin/b2712c5e8f1324485bc6c51b8b8741c4 to your computer and use it in GitHub Desktop.
Push all Containerd images
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 | |
if [ -z "$1" ] | |
then | |
echo "Usage: $0 <repo>" | |
exit 1 | |
fi | |
repo=$1 | |
for image in $(crictl images 2>/dev/null | grep $repo | awk '{print $1":"$2}') | |
do | |
echo "Pushing image: $image" | |
ctr -n k8s.io image push $image | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment