skopeo_list_tags.sh
· 204 B · Bash
Raw
#!/bin/bash
image=$1
filter=$2
notfilter=${3:- }
jqfilter=".RepoTags[] \
| select(contains(\"$filter\")) \
| select(contains(\"$notfilter\") | not)"
skopeo inspect "docker://$image" \
| jq -r "$jqfilter"
| 1 | #!/bin/bash |
| 2 | image=$1 |
| 3 | filter=$2 |
| 4 | notfilter=${3:- } |
| 5 | jqfilter=".RepoTags[] \ |
| 6 | | select(contains(\"$filter\")) \ |
| 7 | | select(contains(\"$notfilter\") | not)" |
| 8 | |
| 9 | skopeo inspect "docker://$image" \ |
| 10 | | jq -r "$jqfilter" |