【问题标题】:Can Google Container Registry (gcr) support Docker Image Manifest V 2, Schema 1?Google Container Registry (gcr) 能否支持 Docker Image Manifest V 2,Schema 1?
【发布时间】:2019-03-08 00:53:36
【问题描述】:

https://cloud.google.com/container-registry/docs/image-formats,我看到 gcr 支持 Docker Image Manifest V 2,Schema 1。但是,当我尝试通过 curl 获取图像 (gcr.io/google-containers/busybox) 的 schema 1 清单时,它失败了:

尝试获取架构 1 清单时出现意外的 HTTP 响应“404 Not Found”

所以我很困惑 gcr 是否真的支持它。

【问题讨论】:

    标签: google-container-registry


    【解决方案1】:

    你的实际curl 命令是什么?

    试试

    curl -v -H "Accept: application/vnd.docker.distribution.manifest.v1+prettyjws" https://gcr.io/v2/google-containers/busybox/manifests/latest
    

    【讨论】:

    • 好的,我现在知道区别了。我在 curl 命令中指定的标头是Accept: application/vnd.docker.distribution.manifest.v1+json,如果我将其更改为Accept: application/vnd.docker.distribution.manifest.v1+prettyjws,那么它可以工作。所以问题转向为什么前一个标头被 gcr 弃用,基于 Docker 的文档 (docs.docker.com/registry/spec/manifest-v2-1),它们都应该被支持。
    猜你喜欢
    • 2018-10-31
    • 2018-12-08
    • 2022-07-21
    • 2022-12-03
    • 1970-01-01
    • 2016-02-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多