File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 7171 '' ;
7272 meta . images = map ( tag : "${ img } :${ tag } " ) tags ;
7373 proviso = l . toFile "container-proviso" ''
74+ function _scopeo_inspect() {
75+ if command &>/dev/null skopeo inspect --insecure-policy "docker://$image"; then
76+ echo "$image"
77+ fi
78+ }
79+ export -f _scopeo_inspect
80+
7481 function scopeo_inspect() {
75- local images=("$@")
76- for image in '' ${images[@]}; do
77- if command &>/dev/null skopeo inspect --insecure-policy "docker://$image"; then
78- echo "$image"
79- fi
80- done
82+ echo "$@" | command xargs -n 1 -P 0 -I {} bash -c '_scopeo_inspect "$@"'
8183 }
8284
8385 declare -a images
8890 )"
8991
9092 command jq --raw-output \
91- --arg available "$(scopeo_inspect '' ${images[@]})" \
93+ --arg available "$(_scopeo_inspect '' ${images[@]})" \
9294 ' map(select(
9395 .meta.images[0] | inside($available) | not
9496 ))
You can’t perform that action at this time.
0 commit comments