docker仓库资源的地址修改

docker仓库资源的地址修改

1、新增或者修改/etc/docker目录下的daemon.json文件

样例文件如下

{
  "registry-mirrors": ["https://kuamavit.mirror.aliyuncs.com", "https://registry.docker-cn.com", "https://docker.mirrors.ustc.edu.cn"],
  "max-concurrent-downloads": 10,
  "storage-driver": "overlay2",
  "graph": "/data/docker",
  "log-driver": "json-file",
  "log-level": "warn",
  "log-opts": {
    "max-size": "10m",
    "max-file": "3"
    }
}

2、保存退出,重启docker

systemctl restart docker

3、测试

搜索 docker search centos

下载 docker pull centos

 

posted @ 2019-11-07 10:06  shhnwangjian  阅读(7501)  评论(0编辑  收藏  举报