docker push 报错 Get https://registry-1.docker.io/v2/: net/http: request canceled
解决办法
docker默认的源为国外官方源,下载速度较慢,可改为国内源
编辑或新建配置文件 /etc/docker/daemon.json
daemon.json
{
"registry-mirrors": ["https://registry.docker-cn.com","http://hub-mirror.c.163.com"],
"live-restore": true
}
1
2
3
4
重新启动docker服务
systemctl restart docker