Docker配置阿里云镜像加速器
《Docker安装详细步骤》:Docker安装详细步骤_周十一.的博客-CSDN博客、
在前面博文已经介绍了docker 的安装,因为某些原因,我们下载镜像比较慢,今天给大家介绍一下,如何配置阿里云的镜像加速器地址。
1、开通阿里云容器镜像服务
登录地址:阿里云-计算,为了无法计算的价值

搜索:容器镜像服务

点击管理控制台

选择镜像工具

选择镜像加速器

在右边就可以看到加速器地址,点击复制,获得了阿里云镜像加速器地址。
2、Docker配置阿里云镜像加速器地址
编辑daemon.json文件
vi /etc/docker/daemon.json
添加如下内容:
{
"registry-mirrors":["https://gkc96gjg.mirror.aliyuncs.com","https://registry.docker-cn.com","https://docker.mirrors.ustc.edu.cn","https://dockerhub.azk8s.cn","http://hub-mirror.c.163.com"]
}
wq 保存退出。
第一个就是我们的阿里云加速器地址,其他也是国内相关加速器地址,如有需要也可以配置进去。
重新加载配置文件
systemctl daemon-reload
重启Docker
systemctl restart docker
一定要查看Docker状态是否正常
systemctl status docker

看到running,表示docker正常运行, 如果没有正常运行,再去看看daemon.json文件 是否编辑错误。