2020-04-08 08:45:56 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-04-19 03:14:44 -05:00
|
|
|
check_if_tags_exists() {
|
|
|
|
local image=$1
|
|
|
|
local tag=$2
|
|
|
|
skopeo list-tags "docker://$image" | jq -r ".Tags | contains([\"$tag\"])"
|
|
|
|
}
|
|
|
|
|
2020-04-08 08:45:56 -05:00
|
|
|
get_image_label() {
|
|
|
|
local label=$1
|
|
|
|
local image=$2
|
2023-03-15 03:13:09 -05:00
|
|
|
skopeo inspect "docker://$image" | jq -r ".Labels[\"$label\"]"
|
2020-04-08 08:45:56 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
get_image_last_layer() {
|
|
|
|
local image=$1
|
2023-03-15 03:13:09 -05:00
|
|
|
skopeo inspect "docker://$image" | jq -r ".Layers | last"
|
2020-04-08 08:45:56 -05:00
|
|
|
}
|