docker设置国内镜像源

2023-10-12运维1 分钟139 次阅读
AI 摘要鱼粮不足,AI 今天先歇着 · 正文在下面

1、国内常用加速地址

  1. Docker中国区官方镜像
    https://registry.docker-cn.com
  2. 网易
    http://hub-mirror.c.163.com
  3. ustc
    https://docker.mirrors.ustc.edu.cn
  4. 中国科技大学
    https://docker.mirrors.ustc.edu.cn
  5. 阿里云容器 生成自己的加速地址
    登录:
    点击“创建我的容器镜像”,得到专属加速地址
    image.png

2、配置方法

创建或修改/etc/docker/daemon.json文件,修改为如下形式

json 复制代码
{
    "registry-mirrors": [
        "https://registry.hub.docker.com",
        "http://hub-mirror.c.163.com",
        "https://docker.mirrors.ustc.edu.cn",
        "https://registry.docker-cn.com"
    ]
}

重启dcoker

sh 复制代码
systemctl restart docker

查看是否配置成功

sh 复制代码
docker info
image.png
觉得有用就点个赞,不用登录也能读

评论

0 条
登录 之后才能评论
—
还没有评论,来说第一句