Docker配置镜像仓库

  • 国外的镜像仓库下载的的很慢,还有可能链接不上,所以最好更改为国内的镜像仓库
  • 修改/或新增: /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"
    }
}
  • 重启dockersystemctl restart docker

  • 查看是否更改为国内的镜像仓库,使用docker info

你可能感兴趣的:(Docker,docker,运维,容器,linux)