# 1. 修改 host
将下述命令加入开机脚本,脚本位置: /boot/config/go
wget -qO - https://raw.hellogithub.com/hosts | cat - >> /etc/hosts |
# 2. 设置 docker 镜像
在 /boot/config/go
中加入下面这段:
mkdir -p /etc/docker | |
tee /etc/docker/daemon.json <<-'EOF' | |
{ | |
"registry-mirrors": ["https://xxxx.mirror.aliyuncs.com"] | |
} | |
EOF |
https://xxxx.mirror.aliyuncs.com
更换成你需要加速的镜像源,我这里使用的是阿里云申请的镜像源,不展示了