【问题标题】:how to use docker buildx pushing image to registry use http protocol?如何使用 docker buildx 推送镜像到 registry 使用 http 协议?
【发布时间】:2020-12-04 03:55:58
【问题描述】:

我想构建一个多架构映像并将其推送到我的私有注册表。但是,我遇到了错误

"未能解决:rpc错误:code = Unknown desc = failed to do 要求:头 https://10.7.121.15/v2/daocloud/multiarch-example/blobs/sha256:4c1976b440416ed5a170b2faf49c05af8f298f7afb07ff1f775b7b1ee7574042: x509:无法验证 10.7.121.15 的证书,因为它没有 包含任何 IP SAN"

当我运行命令时

"docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag 10.7.121.15/daocloud/multiarch-example:latest -f multi-arch.dockerfile 。 --push”

那么如何解决或者如何使用http协议推送图片呢?

【问题讨论】:

    标签: docker build arch


    【解决方案1】:

    尝试将config filehttp: true 一起传递。有关详细信息,请参阅this comment。例如

    [registry."10.7.121.15"]
      http = true
      insecure = true
    

    【讨论】:

      【解决方案2】:

      尝试像这样创建构建器:

      docker buildx create --name ci-builder --driver-opt network=host --use --buildkitd-flags '--allow-insecure-entitlement security.insecure'
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2015-12-17
        • 2021-05-23
        • 1970-01-01
        • 2022-12-01
        • 2018-09-14
        • 1970-01-01
        • 2019-07-01
        • 1970-01-01
        相关资源
        最近更新 更多