# 编辑 Docker 配置文件
sudo vim /etc/docker/daemon.json
# 加入以下配置项
{
"registry-mirrors": [
"<https://dockerproxy.com>",
"<https://hub-mirror.c.163.com>",
"<https://mirror.baidubce.com>",
"<https://ccr.ccs.tencentyun.com>"
]
}
# 重启docker
sudo service docker restart
# 查看docker信息,检验是否成功
sudo docker info
可以用此项目寻找国内最快的镜像
https://github.com/silenceshell/docker_mirror
sudo apt install python-pip
sudo pip install docker -i <https://mirrors.aliyun.com/pypi/simple>
sudo python ./docker_mirror.py