docker 更换国内镜像


1.修改如下文件内容

  1. [root@localhost ~]# vim /etc/docker/daemon.json

2.没有则新建填入一下内容:

  1. {
  2. "registry-mirrors": [
  3. "http://hub-mirror.c.163.com",
  4. "https://docker.mirrors.ustc.edu.cn",
  5. "https://registry.docker-cn.com"
  6. ]
  7. }
  1. [root@localhost ~]# systemctl restart docker

3. 验证是否成功

  1. docker info

更多国内镜像

可以添加的国内源有如下一下:

  1. # Docker 官方中国区
  2. https://registry.docker-cn.com
  3. # 网易
  4. http://hub-mirror.c.163.com
  5. # 中国科技大学
  6. https://docker.mirrors.ustc.edu.cn

BLOG

搜索文章