【问题标题】:Jenkins docker image throwing error while pullingJenkins docker镜像在拉取时抛出错误
【发布时间】:2020-08-20 15:25:16
【问题描述】:

我在 PuTTY 上为在 Oracle VM Virtualbox 上运行的 CentOS 7 创建了 SSH 连接。 在 PuTTy 上,我安装了 Docker,然后安装了 Docker Compose,它们已启动并运行。 但是,当我尝试使用以下方式下载在https://hub.docker.com/r/jenkins/jenkins/ 上找到的 Jenkins Docker 映像时遇到错误:

[jenkins@localhost ~]$ docker pull jenkins/jenkins
Using default tag: latest
Error response from daemon: Get https://registry-1.docker.io/v2/jenkins/jenkins/manifests/latest: Get https://auth.docker.io/token?scope=repository%3Ajenkins%2Fjenkins%3Apull&service=registry.docker.io: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

也试过了:

[jenkins@localhost ~]$  docker pull jenkins/jenkins:lts
Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

我的互联网连接工作正常。 有什么线索可以解决这个问题。?谢谢。

【问题讨论】:

    标签: docker jenkins putty


    【解决方案1】:

    尝试先注销并使用用户名而不是电子邮件登录。

    Github Issues

    【讨论】:

    • Xeros007,我仍然不知道,但在尝试登录和退出几次后,不知何故这有效。在发布问题之前,我尝试登录和退出一次,但早些时候它工作了,但不知何故它现在工作了。
    【解决方案2】:

    我相信您没有在终端上登录您的 docker hub 帐户。 使用命令docker login --username=yourhubusername --email=youremail@company.com进行登录。

    然后尝试 pull 命令。

    【讨论】:

    • 感谢您的回复,由于该帐户未链接到任何电子邮件 ID,因此我尝试了:docker login --username=myhubusername,但收到相同的错误:来自守护进程的错误响应:获取registry-1.docker.io/v2: net/http:在等待连接时取消请求(等待标头时超出 Client.Timeout);但是,当我尝试“sudo systemctl start docker”时,这个命令会抛出启动 docker 的任何错误
    • 此外,sudo docker run hello-world 命令运行良好,这意味着 docker 已启动并正常运行。
    猜你喜欢
    • 2023-03-13
    • 2019-01-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-08
    • 1970-01-01
    • 2021-03-08
    • 1970-01-01
    相关资源
    最近更新 更多