Some bugfixes.

This commit is contained in:
2021-07-01 18:49:49 +00:00
parent 4faddd10b8
commit 58ec63c882
4 changed files with 29 additions and 21 deletions

View File

@@ -0,0 +1,12 @@
#!/bin/sh
ref="${1:-library/ubuntu:latest}"
repo="${ref%:*}"
tag="${ref##*:}"
acceptM="application/vnd.docker.distribution.manifest.v2+json"
acceptML="application/vnd.docker.distribution.manifest.list.v2+json"
token=$(curl -s "https://auth.docker.io/token?service=registry.docker.io&scope=repository:${repo}:pull" | jq -r '.token')
curl -H "Accept: ${acceptM}" \
-H "Accept: ${acceptML}" \
-H "Authorization: Bearer $token" \
-I -s "https://registry-1.docker.io/v2/${repo}/manifests/${tag}"