赞
踩
最近再dockers上拉去镜像的时候,贼慢,而且不成功,仔细想想,之前看过文章说是得换成国内的源,下载快,于是,进行一波操作
vim /etc/docker/daemon.json (没有得话自动创建一个)
{
"registry-mirrors": ["https://y0qd3iq.mirror.aliyuncs.com"]
}
vim /etc/apt/sources.list
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multivers
service docker restart
docker info|grep Mirrors -A 1
一定要重启,如果不重启 不生效,拉去镜像依旧很慢
reboor
或者
init 6
直接更换成国内得镜像,重新更新,重启系统
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。