docker下载镜像设置
对于docker下载过慢问题,修改daemon.json进行相应设置
sudo gedit /etc/docker/daemon.json
#如果vim熟悉也可以用vim
打开界面后,将以下复制进json文件
{"builder": {"gc": {"defaultKeepStorage": "20GB","enabled": true}},"experimental": true,"features": {"buildkit": true},"registry-mirrors": ["https://dockerproxy.com","https://mirror.baidubce.com","https://ccr.ccs.tencentyun.com","https://docker.m.daocloud.io","https://docker.nju.edu.cn","https://docker.mirrors.ustc.edu.cn"],"log-driver":"json-file","log-opts": {"max-size":"500m", "max-file":"3"}
}
保存后退出,重启docker
sudo systemctl daemon-reload
sudo systemctl restart docker
完成后如下:
如果依旧有问题,可以尝试修改如下
sudo gedit /etc/resolv.conf
加上nameserver 8.8.8.8
参考文章:Docker 镜像下载加速(error pulling image configuration:download failed)_error response from daemon: error pulling image co-CSDN博客