fuge
V2EX  ›  问与答

一台新的 centos7 主机,用官方的方法安装完 docker 最新的版本,一运行就报错。网上所有的方法基本都试过了,折腾了一天,还是不能解决,不知道有没有人遇到过。

  •  
  •   fuge · Jun 17, 2022 · 2724 views
    This topic created in 1624 days ago, the information mentioned may be changed or developed.
    安装过程
    proxychains4 yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
    proxychains4 yum install docker-ce docker-ce-cli containerd.io docker-compose-plugin

    运行报错
    docker run sentry

    Unable to find image 'sentry:latest' locally

    docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": x509 : certificate is not valid for any names, but wanted to match registry-1.docker.
    Supplement 1  ·  Jun 17, 2022
    我不用代理,直接换清华的 yum 源会报错。。
    https://mirrors.tuna.tsinghua.edu.cn/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#60 - "Peer's Certificate issuer is not recognized."
    Supplement 2  ·  Jun 24, 2022
    结案了
    是我网络的问题,换到另外一个网络就完全没有问题了。
    21 replies  •  2022-06-18 01:47:44 +08:00
    jifengg
    jifengg
    Jun 17, 2022
    1
    看提示,是证书校验不通过,你先试试这台机器上跑
    curl https://registry-1.docker.io/v2/
    看看是否有相关错误
    hefish
    hefish
    Jun 17, 2022
    2
    不能直接访问公网啊,还要挂 socks 才行吗?
    fuge
    fuge
    OP
    Jun 17, 2022
    3
    @jifengg 感谢回复,报如下的错误。

    curl https://registry-1.docker.io/v2/

    curl: (60) Peer's Certificate issuer is not recognized.
    More details here: http://curl.haxx.se/docs/sslcerts.html

    curl performs SSL certificate verification by default, using a "bundle"
    of Certificate Authority (CA) public keys (CA certs). If the default
    bundle file isn't adequate, you can specify an alternate file
    using the --cacert option.
    If this HTTPS server uses a certificate signed by a CA represented in
    the bundle, the certificate verification probably failed due to a
    problem with the certificate (it might be expired, or the name might
    not match the domain name in the URL).
    If you'd like to turn off curl's verification of the certificate, use
    the -k (or --insecure) option.

    在浏览器打开 https://registry-1.docker.io/v2/
    显示的内容是
    {"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":null}]}
    fuge
    fuge
    OP
    Jun 17, 2022
    4
    @hefish 用的是国外的源,所有挂代理,不挂代理安装不来。
    hertzry
    hertzry
    Jun 17, 2022 via Android
    5
    不能用代理。
    hertzry
    hertzry
    Jun 17, 2022 via Android
    6
    建议你手动下载镜像,然后 docker load 。
    fuge
    fuge
    OP
    Jun 17, 2022
    7
    @hertzry 是最近不能用的吗,因为我之前几台机器都是这样安装的,没有问题的。
    fuge
    fuge
    OP
    Jun 17, 2022
    8
    @hertzry load 以后,run 会报一样的错误。
    bomb77
    bomb77
    Jun 17, 2022
    9
    配置个国内 docker 源镜像试下,别走代理,比如用 daocloud 的 https://www.daocloud.io/mirror
    my3157
    my3157
    Jun 17, 2022
    10
    my3157
    my3157
    Jun 17, 2022
    11
    看错问题了 :dog:
    fkmc
    fkmc
    Jun 17, 2022
    12
    yum update ca 更新下?
    hertzry
    hertzry
    Jun 17, 2022 via Android
    13
    你从别的机器上 docker save 这个镜像,再 docker load 试试?
    hertzry
    hertzry
    Jun 17, 2022 via Android
    14
    应该是这个镜像还需要下载别的东西。
    hertzry
    hertzry
    Jun 17, 2022 via Android
    15
    换一个别的代理,这个代理证书不行。我之前用公用的代理也是这个错误,换了自己的代理就好了。
    xtinput
    xtinput
    Jun 17, 2022
    16
    centos 不是不维护了吗?
    fuge
    fuge
    OP
    Jun 17, 2022
    17
    @hertzry 这个就是我自动的代理,bandwagon 的。。。。
    fuge
    fuge
    OP
    Jun 17, 2022
    18
    @xtinput 内网用,不碍事。
    fuge
    fuge
    OP
    Jun 17, 2022
    19
    @my3157 没有,谢谢回复,您提供的连接很有帮助。
    oott123
    oott123
    Jun 17, 2022
    20
    yum install ca-certificates
    emptystring
    emptystring
    Jun 18, 2022 via Android
    21
    网络环境配置有问题。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1155 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 18:03 · PVG 02:03 · LAX 10:03 · JFK 13:03
    ♥ Do have faith in what you're doing.