2025.1.5 docker国内镜像,亲测可用

最近docker又抽风了,拉取镜像一直报连接超时的错误

 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).
 Error response from daemon: Get "https://registry-1.docker.io/v2/": dial tcp ip: connect: connection refused

遇到这种超时错误基本就是国内镜像拉取不了的问题,解决方案就是更换能连接的国内镜像就可以了,其他的配置host什么都没有用。

亲测几个能用的国内镜像,速度很快,但不知道什么时候会失效,先用着吧,在/etc/docker/daemon.json添加

"registry-mirrors": [
        "https://docker.1ms.run",
        "https://docker.xuanyuan.me",
        "https://docker.rainbond.cc",
        "https://do.nark.eu.org",
        "https://dc.j8.work"
    ],

保存后执行

sudo systemctl daemon-reload
sudo systemctl restart docker

### 2025Docker 镜像加速源列表 为了提高 Docker 镜像下载的速度并确保稳定性,可以使用以下经过验证的镜像加速源。这些镜像源适用于 2025 年,并且已经过试确认可用。 #### 推荐使用的镜像加速源: - **LiberX Info** ```json { "registry-mirrors": ["https://register.liberx.info"] } ``` - **Docker Pull** ```json { "registry-mirrors": ["https://dockerpull.com"] } ``` - **AnyHub US KG** ```json { "registry-mirrors": ["https://docker.anyhub.us.kg"] } ``` - **Jobcher Hub** ```json { "registry-mirrors": ["https://dockerhub.jobcher.com"] } ``` - **Docker Hub ICU** ```json { "registry-mirrors": ["https://dockerhub.icu"] } ``` - **AWS L9527 CN** ```json { "registry-mirrors": ["https://docker.awsl9527.cn"] } ``` - **Unsee Tech** 使用此镜像源可以直接拉取镜像而无需 `https://` 前缀: ```bash docker pull docker.unsee.tech/istio/distroless ``` - **LinkedBus** ```json { "registry-mirrors": ["https://docker.linkedbus.com"] } ``` - **玄远科技** ```json { "registry-mirrors": ["https://docker.xuanyuan.me"] } ``` #### 配置方法 将上述任意一个或多个镜像源添加到 `/etc/docker/daemon.json` 文件中。如果文件不存在,则创建该文件。以下是具体操作命令: ```bash sudo mkdir -p /etc/docker sudo tee /etc/docker/daemon.json <<EOF { "registry-mirrors": [ "https://register.liberx.info", "https://dockerpull.com", "https://docker.anyhub.us.kg", "https://dockerhub.jobcher.com", "https://dockerhub.icu", "https://docker.awsl9527.cn", "https://docker.linkedbus.com", "https://docker.xuanyuan.me" ] } EOF ``` 完成配置后,重新加载 Docker 守护进程并重启服务以使更改生效: ```bash sudo systemctl daemon-reload sudo systemctl restart docker ``` 通过以上设置,能够显著提升 Docker 镜像的获取效率和成功率[^1][^2][^3][^4]。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值