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)

sudo docker run hello-world

docker: 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).
See ‘docker run --help‘.

修改docker镜像源:

docker默认的源为国外官方源,下载速度较慢,可改为国内,加速

方案一

修改或新增 /etc/docker/daemon.json

# vi /etc/docker/daemon.json

{

"registry-mirrors": ["http://hub-mirror.c.163.com"]

}

systemctl restart docker.service

方案二

修改或新增 /etc/sysconfig/docker,在OPTIONS变量后追加参数  --registry-mirror=https://docker.mirrors.ustc.edu.cn

# vi /etc/sysconfig/docker

OPTIONS=‘--selinux-enabled --log-driver=journald --registry-mirror=https://docker.mirrors.ustc.edu.cn‘

Docker国内源说明(提示:可以多尝试几个源):

Docker 官方中国区

https://registry.docker-cn.com

网易

http://hub-mirror.c.163.com

中国科技大学

https://docker.mirrors.ustc.edu.cn

阿里云

https://pee6w651.mirror.aliyuncs.com

最终我用下面的方案解决了:

进入/etc/docker

查看有没有 daemon.json。这是docker默认的配置文件。

如果没有新建,如果有,则修改。

[[email protected] docker]# vi daemon.json
{
  "registry-mirrors": ["https://registry.docker-cn.com",“http://hub-mirror.c.163.com"]
}

保存退出。

重启docker服务

service docker restart

成功!
 
---------------------

内容转载自:https://blog.csdn.net/BigData_Mining/article/details/87869147

原文地址:https://www.cnblogs.com/qiao123/p/11267021.html

时间: 2024-10-27 08:33:03

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)的相关文章

centOS7关于pull 命令时报错:get https://registry-1.docker.io/v2/:ner/http:TLS handshake timeout 或者 request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers

参考文件:https://www.cnblogs.com/icebutterfly/p/9489133.html 报错:get https://registry-1.docker.io/v2/:ner/http:TLS handshake timeout 或者 request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers 原因:连接不到 镜像库所致: 解决办法: 1.运行

mac上docker pull是报错Error response from daemon: Get https://xx.xx.xx.xx/v2/: Service Unavailable

执行docker pull xx.xx.xx.xx/xx/xx,下载私有库的镜像时报错如下: Error response from daemon: Get https://xx.xx.xx.xx/v2/: Service Unavailable 原因大概是docker默认支持https的协议,而私有库是http的协议. mac桌面可以在Preferences-->Docker Engine里配置以下代码,xx.xx.xx.xx是自己私有库的地址. { "insecure-registri

docker从私有镜像库pull/push镜像问题:Error response from daemon: Get https://harbor.op.xxxx.com/v2/: x509: certificate signed by unknown authority

环境centos7+docker 1.17 解决方法:1. 添加https证书,方法自己搜下2. 加--insecure-registry参数 配置文件位置/usr/lib/systemd/system/docker.serviceExecStart=/usr/bin/dockerd --insecure-registry harbor.op.xxxx.com 之前也搜到过ExecStart=/usr/bin/docker daemon -H fd:// --insecure-registry=

docker pull / docker login 报错 Error response from daemon: Get https://registry-1.docker.io/v2/: x509

docker pull 和 docker login 的时候报错 Error response from daemon: Get https://registry-1.docker.io/v2/: x509: certificate is valid for bw-production.space, brickworksoftware.com, *.bw-production.space, *.brickworksoftware.com, not registry-1.docker.io 从报错

Docker问题解决:Error response from daemon: Get https://registry-1.docker.io/v2/yandex/clickhouse-server/manifests/latest: net/http: TLS handshake timeout

方法1: vi /etc/docker/daemon.json { "registry-mirrors": ["http://hub-mirror.c.163.com"] } systemctl restart docker.service 方法2: vi /etc/sysconfig/docker OPTIONS='--selinux-enabled --log-driver=journald --registry-mirror=https://docker.mi

Docker获取镜像报错docker: Error response from daemon

docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled今天在使用docker获取镜像时,出现了镜像获取报错的问题,找到了解决的方法记一下. 一.问题 ? ~ docker search sameersbnError response from daemon: Get https://index.docker.io/v1/search?q=sameers

使用docker报错 :Error response from daemon: Get https://index.docker.io/v1/search?q=java&n=25: dial tcp:

查看服务器DNS网络配置 vim /etc/resolv.conf 把里面的内容注释,并改为: nameserver 8.8.8.8 nameserver 8.8.8.4 重启网络服务 systemctl restart network 即可 原文地址:https://www.cnblogs.com/zhengyuanyuan/p/11830308.html

Error response from daemon: error creating overlay mount to /var/lib/docker/overlay2

环境:centos7.1 docker run -t -i centos /bin/bash 运行上面的命令开启容器时报错: /usr/bin/docker-current: Error response from daemon: error creating overlay mount to /var/lib/docker/overlay2/8c4e909f7bd85dd94ac3483b209643dd02b4e45adfc0b8ee141a95214903a5c8/merged: inva

docker: Error response from daemon: driver failed programming external connectivity on endpoint jolly_shockley

1. docker 启动image错误 docker: Error response from daemon: driver failed programming external connectivity on endpoint jolly_shockley (957a1271cd0ae4f9f28163b7cdf5c17d6110fcd6ccd2ca79f2cf0ab8c67dfd52): (iptables failed: iptables --wait -t nat -A DOCKER