Docker OCI Parameter Passing Incus 6.3

Note that you can do without the skopeo call.

DOCKER_IMG="$(incus config get ${1} image.description | sed -e 's/^docker.io\///' -e 's/ .*//')"
SHA_LOCAL="$(incus config get ${1} volatile.base_image"
SHA_REMOTE="$(incus image info docker:${DOCKER_IMG} | grep ^Fingerprint | cut -d' ' -f2)"

This will basically do the skopeo inspect call for you through incus image info

2 Likes