【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%原创,转载请务必标注原创作者,尊重劳动成果。

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

相关推荐
ai小陈7 小时前
GPU服务器租用存储验收:检查点写入与磁盘吞吐实战
运维·服务器·人工智能·ai·ssh·gpu算力
灯澜忆梦9 小时前
【minio】#1 | 简介与安装
docker·对象存储·minio
有毒的教程10 小时前
VMware仅主机模式:物理机 ↔ 虚拟机 文件共享
运维
山岚的运维笔记12 小时前
ComfyUI NVIDIA安装教程:官方便携版下载+run_nvidia_gpu.bat启动,8G显存Windows实操
运维·服务器·windows·笔记·prompt·aigc·comfyui
海宇大数据13 小时前
零信任架构实战:基于海宇活体识别V步骤1构建自动化远程公证会话初始化网关
运维·人工智能·架构·自动化
lisanmengmeng13 小时前
Nagios邮件报警的配置
linux·运维·服务器
Ruiery13 小时前
Linux 6.6内核 CPU 深度解析(六):cpufreq
linux·运维·服务器
天远数科14 小时前
零信任架构实战:基于天远全能消金报告构建自动化消费分期网关
运维·人工智能·架构·自动化
硅基手札14 小时前
【linux内核专栏 08】时间与定时器
linux·运维·服务器
想做小南娘,发现自己是女生喵15 小时前
Linux之Ubuntu入门篇知识总结
linux·运维·服务器