[Seek Help] docker无法拉取镜像
Tofloor
poster avatar
disburden
deepin
2024-09-25 13:24
Author

deepin23

docker: 27.3.1

拉取镜像的时候总是提示:

docker pull p3terx/aria2-pro
Using default tag: latest
Error response from daemon: Get "https://registry-1.docker.io/v2/": context deadline exceeded

我试过了以下各种方法,一点效果都没有,都是这个提示,感觉好像docker里的代码就是print这两句话一样.

1.修改/etc/docker/daemon.json指定国内源

"https://registry.docker-cn.com"

2.禁用ipv6

3.修改dns为114.114.114.114

4.修改hosts文件,直接解析registry-1.docker.io域名,自己解析不出来,网络上找的一个ip,没效果

5.使用科学上网

求助还有哪些招能出?

Reply Favorite View the author
All Replies
xye9008
deepin
2024-09-25 15:31
#1

目前docker已被管控,建议更换源,百度搜阿里等提供的镜像仓库

Reply View the author
youxiaokai
deepin
2024-09-25 15:39
#2

科学上网是可以的

有敏感词汇,打个码
image.png

Reply View the author
youxiaokai
deepin
2024-09-25 15:41
#3
youxiaokai

科学上网是可以的

有敏感词汇,打个码
image.png

新建http-p***y.conf文件

sudo mkdir -p /etc/systemd/system/docker.service.d
sudo vim /etc/systemd/system/docker.service.d/http-p***y.conf

插入以下内容:

[Service]
Environment="HTTP_P***Y=http://127.0.0.1:7890"
Environment="HTTPS_P***Y=http://127.0.0.1:7890"
Environment="NO_P***Y=localhost,127.0.0.1,docker-registry.example.com,.corp"

重启docker:

sudo systemctl daemon-reload
sudo systemctl restart docker

验证配置生效:

sudo systemctl show --property=Environment docker
Reply View the author
disburden
deepin
2024-09-25 16:11
#4
youxiaokai

新建http-p***y.conf文件

sudo mkdir -p /etc/systemd/system/docker.service.d
sudo vim /etc/systemd/system/docker.service.d/http-p***y.conf

插入以下内容:

[Service]
Environment="HTTP_P***Y=http://127.0.0.1:7890"
Environment="HTTPS_P***Y=http://127.0.0.1:7890"
Environment="NO_P***Y=localhost,127.0.0.1,docker-registry.example.com,.corp"

重启docker:

sudo systemctl daemon-reload
sudo systemctl restart docker

验证配置生效:

sudo systemctl show --property=Environment docker
这个我也试过了,没效果
└> sudo systemctl show --property=Environment docker
Environment=HTTP_P***Y=http://127.0.0.1:1089 HTTPS_P***Y=http://127.0.0.1:1089 NO_P***Y=localhost,>
┌[disburdenhuahuoguiye]-(~/docker/aria2)
└> docker pull p3terx/aria2-pro
Using default tag: latest
Error response from daemon: Get "https://registry-1.docker.io/v2/": EOF
Reply View the author
disburden
deepin
2024-09-25 16:14
#5
@youxiaokai
好像可以了,估计之前dl走的是ipv6的,我改成ipv4的,现在能正常拉取了
非常感谢!!
Reply View the author
Oli
deepin
2024-09-26 21:39
#6

顶帖

Reply View the author