【开发日记】Docker修改国内镜像源

1、问题:

docker pull镜像时提示以下内容:

复制代码
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)

2、解决

① 进入/etc/docker目录下,命令如下:

复制代码
cd /etc/docker

② 编辑daemon.json文件

复制代码
vi daemon.json

将内容修改为如下内容:

复制代码
{
    "registry-mirrors": [
        "http://hub.xdark.top",
        "http://hub.littlediary.cn",
        "http://dockerpull.org",
        "http://hub.crdz.gq",
        "http://docker.1panel.live",
        "http://docker.unsee.tech",
        "http://docker.m.daocloud.io",
        "http://docker.kejilion.pro",
        "http://registry.dockermirror.com",
        "http://hub.rat.dev",
        "http://dhub.kubesre.xyz",
        "http://docker.nastool.de",
        "http://docker.udayun.com",
        "http://docker.rainbond.cc",
        "http://hub.geekery.cn",
        "http://docker.1panelproxy.com"
    ]
}

使用了国内镜像后docker search还是不能使用,但是docker pull可以正常使用。

相关推荐
a123_z10 分钟前
.NET 创建MCP使用大模型对话二:调用远程MCP服务
运维·服务器
葟雪儿19 分钟前
Docker常用命令
linux·服务器·spring cloud·docker·微服务·容器
木盏27 分钟前
Linux终止进程(kill process)的一些玩法
linux·运维·深度学习
Fanche40427 分钟前
Linux-CentOS-7—— 安装MySQL 8
linux·运维·数据库·mysql·centos
橘子1328 分钟前
Linux信号——信号的处理(3)
linux·运维·服务器
CZIDC41 分钟前
Nginx搭建API网关服务教程-系统架构优化 API统一管理
运维·nginx·系统架构
Algorithm15761 小时前
linux如何查看当前系统的资源占用情况
linux·运维·服务器
爬台阶的蚂蚁2 小时前
搭建docker registry私服,并且支持https推送
docker·容器·https
玄明Hanko3 小时前
记一次生产流量事故
运维·后端·安全
张家宝68373 小时前
Containerd学习
后端·容器