背景:在国内使用docker拉取镜像的时候总是很慢,需要修改镜像仓库地址为国内的地址。
步骤:
1、登陆阿里云获取加速地址
https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors
2、修改配置文件/etc/docker/daemon.json,没有就创建
加速地址不一样,xxxx需要修改为你的地址。
https://vcw3fe1o.mirror.aliyuncs.com
{
"registry-mirrors": ["https://xxxxxx.mirror.aliyuncs.com"]
}
3、重启docker服务,使配置生效。
其他国内仓库地址
- 网易:https://hub-mirror.c.163.com/
- 阿里云:https://<你的ID>.mirror.aliyuncs.com
- 七牛云加速器:https://reg-mirror.qiniu.com