mirror of
https://github.com/netbox-community/netbox-docker.git
synced 2025-05-02 20:34:30 +02:00
18 lines
333 B
Bash
18 lines
333 B
Bash
#!/bin/bash
|
|
|
|
get_image_label() {
|
|
local label=$1
|
|
local image=$2
|
|
skopeo inspect "docker://$image" | jq -r ".Labels[\"$label\"]"
|
|
}
|
|
|
|
get_image_layers() {
|
|
local image=$1
|
|
skopeo inspect "docker://$image" | jq -r ".Layers"
|
|
}
|
|
|
|
get_image_last_layer() {
|
|
local image=$1
|
|
skopeo inspect "docker://$image" | jq -r ".Layers | last"
|
|
}
|