Skip to content

Instantly share code, notes, and snippets.

@jovemfelix
Created March 25, 2021 19:07
Show Gist options
  • Save jovemfelix/d06f9993c10845bac5cf68f800a97a22 to your computer and use it in GitHub Desktop.
Save jovemfelix/d06f9993c10845bac5cf68f800a97a22 to your computer and use it in GitHub Desktop.
export CREDS=$(oc whoami):$(oc whoami -t)
export IMAGE_FILE_PATH=image-final
export OUTPUT_CVS_FOUND_PATH=image-url-found.csv
i=0
rm -f $OUTPUT_CVS_FOUND_PATH
cat $IMAGE_FILE_PATH | while read line
do
((i = i + 1))
registry="$line"
echo "$i --> $registry"
imageUrl=$(skopeo inspect --tls-verify=false --creds=$CREDS docker://$registry | jq '.Labels.url')
echo "$registry;$imageUrl" >> $OUTPUT_CVS_FOUND_PATH
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment