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

以上是我使用的命令。我已经在标头中将 Accept 字段设置为模式版本 2清单媒体类型,但它仍然返回我具有模式版本 1的清单

4

1 回答 1

4

我相信 v2 模式的 Accept 类型是"application/vnd.docker.distribution.manifest.v2+json"根据 docker 注册表代码,请参阅:

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

于 2016-04-28T17:56:16.147 回答