mirror of
https://github.com/netbox-community/netbox-docker.git
synced 2024-11-25 17:33:20 +01:00
19 lines
375 B
Bash
19 lines
375 B
Bash
#!/bin/bash
|
|
|
|
check_if_tags_exists() {
|
|
local image=$1
|
|
local tag=$2
|
|
skopeo list-tags "docker://$image" | jq -r ".Tags | contains([\"$tag\"])"
|
|
}
|
|
|
|
get_image_label() {
|
|
local label=$1
|
|
local image=$2
|
|
skopeo inspect "docker://$image" | jq -r ".Labels[\"$label\"]"
|
|
}
|
|
|
|
get_image_last_layer() {
|
|
local image=$1
|
|
skopeo inspect "docker://$image" | jq -r ".Layers | last"
|
|
}
|