加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

如何使用curl命令获取清单v2模式版本2

发布时间:2020-12-16 03:24:04 所属栏目:安全 来源:网络整理
导读:curl -H "Authorization: Bearer $BEARER" -H "Accept: application/vnd.docker.image.manifest.v2+json" https://registry-1.docker.io/v2/$NAME/manifests/sha256:3eb57a4024e69d05ace49be70ab9d13610cfe611a0191c7edc26f5a2b675e7b1 以上是我使用的命

curl -H "Authorization: Bearer $BEARER" 
     -H "Accept: application/vnd.docker.image.manifest.v2+json" 
     https://registry-1.docker.io/v2/$NAME/manifests/sha256:3eb57a4024e69d05ace49be70ab9d13610cfe611a0191c7edc26f5a2b675e7b1

以上是我使用的命令.我已经在标头中将“接受”字段设置为架构版本2清单媒体类型,但仍然返回架构版本1的清单文件

最佳答案
我相信v2模式的接受类型根据docker注册表代码为“ application / vnd.docker.distribution.manifest.v2 json”,请参阅:

https://github.com/docker/distribution/blob/f4b6fc8d681c42137b7d2bb544b087462bc34d47/manifest/schema2/manifest.go#L15

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读