提示本文原创作品良心制作干货为主简洁清晰一看就会文章目录前言方式一方式二方式三前言本文章专门用来收录docker的镜像加速器总有一款你能用方式一rootdocker:~# 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]}rootdocker:~# systemctl daemon-reloadrootdocker:~# systemctl restart dockerrootdocker:~# 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 imagefornginx:1.24 docker.io/library/nginx:1.24方式二exec-opts: [native.cgroupdriversystemd] 配置Cgroup驱动程序Cgroup驱动程序用于限制分配给进程的资源官方建议配置容器运行时和kubelet使用systemdsystemd是Linux系统第一个初始进程作为容器的控制组Cgroup以此使系统更稳定rootdocker:~# 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,exec-opts:[native.cgroupdriversystemd]}rootdocker:~# systemctl daemon-reloadrootdocker:~# systemctl restart dockerrootdocker:~# 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 imagefornginx:latest docker.io/library/nginx:latest方式三rootdocker:~# vim /etc/docker/daemon.json{registry-mirrors:[https://docker.1panel.live,http://hub-mirror.c.163.com,https://mirror.baidubce.com,https://mirror.ccs.tencentyun.com]}注文中若有疏漏欢迎大家指正赐教。本文为100%原创转载请务必标注原创作者尊重劳动成果。求赞、求关注、求评论你的支持是我更新的最大动力评论区等你
【docker镜像加速器配置】
发布时间:2026/5/22 3:58:21
提示本文原创作品良心制作干货为主简洁清晰一看就会文章目录前言方式一方式二方式三前言本文章专门用来收录docker的镜像加速器总有一款你能用方式一rootdocker:~# 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]}rootdocker:~# systemctl daemon-reloadrootdocker:~# systemctl restart dockerrootdocker:~# 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 imagefornginx:1.24 docker.io/library/nginx:1.24方式二exec-opts: [native.cgroupdriversystemd] 配置Cgroup驱动程序Cgroup驱动程序用于限制分配给进程的资源官方建议配置容器运行时和kubelet使用systemdsystemd是Linux系统第一个初始进程作为容器的控制组Cgroup以此使系统更稳定rootdocker:~# 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,exec-opts:[native.cgroupdriversystemd]}rootdocker:~# systemctl daemon-reloadrootdocker:~# systemctl restart dockerrootdocker:~# 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 imagefornginx:latest docker.io/library/nginx:latest方式三rootdocker:~# vim /etc/docker/daemon.json{registry-mirrors:[https://docker.1panel.live,http://hub-mirror.c.163.com,https://mirror.baidubce.com,https://mirror.ccs.tencentyun.com]}注文中若有疏漏欢迎大家指正赐教。本文为100%原创转载请务必标注原创作者尊重劳动成果。求赞、求关注、求评论你的支持是我更新的最大动力评论区等你