def get_image_digest(registry, image, tag):
urllib3.disable_warnings()
url = MANIFEST_URL % dict(registry=registry, image=image, reference=tag)
headers = {"Accept": "application/vnd.docker.distribution.manifest.v2+json"}
response = requests.get(url=url, headers=headers, verify=False)
return response.headers['Docker-Content-Digest']
评论列表
文章目录