【问题标题】:Docker Error Pulling Images in UbuntuDocker 在 Ubuntu 中拉取镜像时出错
【发布时间】:2023-03-13 00:31:01
【问题描述】:

我正在尝试在 docker 中提取图像,但出现以下错误:

root@ubuntu:~# docker pull hello-world

提取存储库 hello-world

FATA[0003] 获取 https://index.docker.io/v1/repositories/library/hello-world/images: x509: 无法加载系统根目录并且没有提供根目录

【问题讨论】:

    标签: ubuntu docker


    【解决方案1】:

    确保您的系统时间设置正确。当我的虚拟机时间与现实世界不同步时,我看到了这个错误。

    试试

    sudo ntpdate time.nist.gov
    

    【讨论】:

      【解决方案2】:

      你需要更新 repos,移除 lxc-docker 并安装 docker-engine

      1. 添加新的 gpg 密钥

        $ apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
        
      2. 编辑您的 /etc/apt/sources.list.d/docker.list

        $ vim /etc/apt/sources.list.d/docker.list
        
        #remove the contents and replace with the following depending on your os  and version:
        

        Debian Wheezy

        deb https://apt.dockerproject.org/repo debian-wheezy main
        

        Debian 杰西

        deb https://apt.dockerproject.org/repo debian-jessie main
        

        Debian Stretch/Sid

        deb https://apt.dockerproject.org/repo debian-stretch main
        

        Ubuntu 精确版

        deb https://apt.dockerproject.org/repo ubuntu-precise main
        

        Ubuntu 值得信赖

        deb https://apt.dockerproject.org/repo ubuntu-trusty main
        

        Ubuntu Utopic

        deb https://apt.dockerproject.org/repo ubuntu-utopic main
        

        Ubuntu 生动

        deb https://apt.dockerproject.org/repo ubuntu-vivid main
        

        Ubuntu 威利

        deb https://apt.dockerproject.org/repo ubuntu-wily main
        
      3. 更新源文件后,运行以下命令:

        $ apt-get update
        
      4. 删除旧的

        $ apt-get purge lxc-docker*
        
      5. 安装新的

        $ apt-get install docker-engine
        

      【讨论】:

        【解决方案3】:

        我解决这个问题是通过运行两个命令 这是sudo apt-get install --reinstall ca-certificates ca-certificates-java

        sudo service docker restart
        

        现在拉任何东西

        【讨论】:

          【解决方案4】:

          两种修复方法。

          1) 你可以登录 docker: docker login (console command) - 10% 可以帮助

          2) docker 在 ubuntu 上安装有问题。

          您需要编辑文件 /etc/resolv.conf

          2.1) 在此文件中添加下两行

          nameserver 8.8.8.8
          

          nameserver 8.8.4.4

          2.2) 并重启 docker

          sudo service docker restart
          

          【讨论】:

            猜你喜欢
            • 2019-01-23
            • 1970-01-01
            • 2021-03-08
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            相关资源
            最近更新 更多