且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我可以在没有下载图像的情况下获得图像摘要吗?

更新时间:2023-02-09 13:35:00

尝试

$ curl -H "Accept: application/vnd.docker.distribution.manifest.v2+json" 'https://auth.docker.io/token?service=registry.docker.io&scope=repository:waisbrot/wait:pull' -H "Authorization: Basic ${username_password_base64}"

背景:这个论坛链接正在讨论同样的问题。

Background: This forum link is discussing the same issue.

问题是服务器选择的默认内容类型是 application / vnd.docker.distribution.manifest.v1 + prettyjws (v1版本),您需要v2清单。因此,您需要将接受标头设置为 application / vnd.docker.distribution.manifest.v2 + json

The problem is that the default content-type being selected by the server is application/vnd.docker.distribution.manifest.v1+prettyjws (a v1 manifest) and you need to v2 manifest. Therefore, you need to set the Accept header to application/vnd.docker.distribution.manifest.v2+json.