Skip to content

Instantly share code, notes, and snippets.

@MParvin
Last active October 23, 2024 21:43
Show Gist options
  • Save MParvin/b2712c5e8f1324485bc6c51b8b8741c4 to your computer and use it in GitHub Desktop.
Save MParvin/b2712c5e8f1324485bc6c51b8b8741c4 to your computer and use it in GitHub Desktop.
Push all Containerd images
#!/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