Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Reading Docker image labels from registry
TOKEN=$(curl -s "$IMAGE:pull&" | jq -r .token)
CONFIG_DIGEST=$(curl -s -H"Accept: application/vnd.docker.distribution.manifest.v2+json" -H"Authorization: Bearer $TOKEN" "$IMAGE/manifests/$TAG" | jq -r .config.digest)
RESULT=$(curl -sL -H"Authorization: Bearer $TOKEN" "$IMAGE/blobs/$CONFIG_DIGEST" | jq -r .container_config.Labels)
echo $RESULT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.