【docker镜像加速器配置】

提示:本文原创作品,良心制作,干货为主,简洁清晰,一看就会

文章目录

方式一

bash 复制代码
root@docker:~# vim /etc/docker/daemon.json
{
"registry-mirrors":["https://a88uijg4.mirror.aliyuncs.com",
                    "https://docker.lmirror.top",
					"https://docker.m.daocloud.io", 
					"https://hub.uuuadc.top",
					"https://docker.anyhub.us.kg",
					"https://dockerhub.jobcher.com",
					"https://dockerhub.icu",
					"https://docker.ckyl.me",
					"https://docker.awsl9527.cn",
					"https://docker.laoex.link"]
}
root@docker:~# systemctl daemon-reload
root@docker:~# systemctl restart docker
root@docker:~# docker pull nginx:1.24   #测试拉取
1.24: Pulling from library/nginx
04e7578caeaa: Pull complete 
57a1056ea484: Pull complete 
6989106bacf0: Pull complete 
c00d1142b331: Pull complete 
cb49393af980: Pull complete 
5ac1ebd8aebe: Pull complete 
Digest: sha256:f6daac2445b0ce70e64d77442ccf62839f3f1b4c24bf6746a857eff014e798c8
Status: Downloaded newer image for nginx:1.24
docker.io/library/nginx:1.24

方式二

bash 复制代码
root@docker:~# vim /etc/docker/daemon.json
{
    "registry-mirrors": ["https://docker.mirrors.ustc.edu.cn",
                        "https://docker.m.daocloud.io",
                        "http://hub-mirrors.c.163.com"],
    "max-concurrent-downloads": 10,
    "log-driver": "json-file",
    "log-level": "warn",
    "data-root": "/var/lib/docker"
}
root@docker:~# systemctl daemon-reload
root@docker:~# systemctl restart docker
root@docker:~# docker pull nginx   #测试拉取
Using default tag: latest
latest: Pulling from library/nginx
5435b2dcdf5c: Pull complete 
054715a6bffa: Pull complete 
88d1d984b765: Pull complete 
4a038fd18db1: Pull complete 
84e114c2bb36: Pull complete 
7b5d674621c2: Pull complete 
448ea5cac5d5: Pull complete 
Digest: sha256:7f0adca1fc6c29c8dc49a2e90037a10ba20dc266baaed0988e9fb4d0d8b85ba0
Status: Downloaded newer image for nginx:latest
docker.io/library/nginx:latest

注:

文中若有疏漏,欢迎大家指正赐教。

本文为100%原创,转载请务必标注原创作者,尊重劳动成果。

求赞、求关注、求评论!你的支持是我更新的最大动力,评论区等你~

相关推荐
qq_452396232 小时前
第十五篇:《UI自动化中的稳定性优化:解决flaky tests的七种武器》
运维·ui·自动化
j_xxx404_2 小时前
Linux:静态链接与动态链接深度解析
linux·运维·服务器·c++·人工智能
Elastic 中国社区官方博客3 小时前
Elastic-caveman : 在不损失 Elastic 最佳效果的情况下,将 AI 响应 tokens 减少64%
大数据·运维·数据库·人工智能·elasticsearch·搜索引擎·全文检索
jsons14 小时前
给每台虚拟机设置独立控制台密码
linux·运维·服务器
皮皮冰燃4 小时前
docker-18-WSL中安装docker并部署flask服务
docker·容器·flask
少年白char4 小时前
整理上万首音乐后的完整工作流:下载、刮削、播放与避坑指南
docker·nas·musictag·音乐刮削·音乐标签
云栖梦泽5 小时前
Linux内核与驱动:14.SPI子系统
linux·运维·服务器·c++
福大大架构师每日一题5 小时前
openclaw v2026.4.24 发布:Google Meet 深度集成、DeepSeek V4 上线、浏览器自动化与插件架构全面升级
运维·架构·自动化·openclaw
yipiantian6 小时前
在Claude项目中实现跨目录访问Skills
linux·运维·服务器
Agent产品评测局6 小时前
生产排期与MES/ERP系统打通,实操方法详解 —— 2026企业级智能体自动化选型与实战指南
java·运维·人工智能·ai·chatgpt·自动化