docker pull 报错
docker pull报错Error response from daemon: Get https://index.docker.io/v1/search?q=n&n=25: proxyconnect tcp: dial tcp 127.0.0.1:8118: connect: connection refused原因可能性一: docker使用了代理1、查看配置systemctl sh
docker pull报错Error response from daemon: Get https://index.docker.io/v1/search?q=n&n=25: proxyconnect tcp: dial tcp 127.0.0.1:8118: connect: connection refused
原因可能性一: docker使用了代理
1、查看配置
systemctl show --property=Environment docker
2、删除代理
vim /etc/systemd/system/docker.service.d/http-proxy.conf
删除里面的代理内容。
3、刷新docker配置
sudo systemctl daemon-reload
4、重启docker
sudo systemctl restart docker
5、docker环境变量,
systemctl show --property=Environment docker
原因可能性二
解决Connecting to 127.0.0.1:8118... failed: Connection refused.
这里是代理问题的锅
$ env|grep -I proxy
http_proxy=http://127.0.0.1:8118
ftp_proxy=http://127.0.0.1:8118
https_proxy=http://127.0.0.1:8118
我们需要把/etc/profile中的代理注释掉在进行 以下操作
unset http_proxy
unset ftp_proxy
unset https_proxy
原因可能性三
问题报错:
Error response from daemon: Get https://index.docker.io/v1/search?q=httpd&n=25: dial tcp: lookup index.docker.io: no such host
解决方案:
查看服务器DNS网络配置
vim /etc/resolv.conf ```
把里面的内容注释,并改为:
nameserver 8.8.8.8
nameserver 8.8.8.4
然后重启网络服务
systemctl restart network
再接着重启docker
systemctl restart docker
更多推荐
所有评论(0)