gpt4 book ai didi

ubuntu - Docker 不下载图像(注册表连接问题)

转载 作者:太空宇宙 更新时间:2023-11-03 16:57:04 26 4
gpt4 key购买 nike

我是按照官方教程安装docker的:https://docs.docker.com/engine/installation/linux/ubuntulinux/

我的连接问题:

当我执行 docker run hello-world 时,我得到以下输出:

Unable to find image 'hello-world:latest' locally

然后docker等待7-8分钟,输出:

Error parsing HTTP response: invalid character '<' looking for beginning of value: "408 Request Time-out Your browser didn't send a complete request in time"

使用 docker login 登录 dockerhub 也不起作用.当我输入错误的用户数据时,我得到:

Error response from daemon: Get https://registry-1.docker.io/v2/: unauthorized: incorrect username or password

但是当我输入正确的数据时,我得到:

Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled (Client.Timeout exceeded while awaiting headers)

当我从消息 ( curl https://registry-1.docker.io/v2/ ) 中 curl URL 时,我得到了

{"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":null}]}

Docker 和 Ubuntu 版本:

Docker version 1.11.0, build 4dc5990

Linux jo-desktop 4.2.0-34-generic #39~14.04.1-Ubuntu SMP Fri Mar 11 11:38:02 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

我已经检查过的内容:

a) sudo ufw status输出 Status: inactive

b) 这是一个家庭网络,其中所有设备都连接到 DSL 路由器。 Docker 在连接到此路由器的其他设备上工作

c) Docker 在虚拟机上有同样的连接问题,其主机是我正在使用的 ubuntu。所以这似乎是我使用的Ubuntu的网络问题

d) 还有其他人遇到我的问题(例如 https://github.com/docker/docker/issues/20628 )。所以我将 eth0 和 docker 的 MTU 更改为 1500。它没有改变任何东西。

关于如何发现问题的想法?

有人知道我还可以尝试找出哪些组件会阻止与 docker 注册表的正确连接吗?

最佳答案

解决了问题:

我必须将网络接口(interface)的 MTU 设置为 900。

关于ubuntu - Docker 不下载图像(注册表连接问题),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36663223/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com