1 鏡像加速器介紹
默認情況下,將來從docker hub(https://hub.docker.com/)上下載docker鏡像,太慢。一般都會配置鏡像加速器:
- USTC:中科大鏡像加速器(https://docker.mirrors.ustc.edu.cn)
- 阿里云
- 網易云
- 騰訊云
2 配置 Docker 鏡像加速器
(1)添加鏡像加速器到配置文件
sudo tee /etc/docker/daemon.json <<-'EOF'
{"registry-mirrors": ["https://oxo4unnj.mirror.aliyuncs.com"]
}
EOF
(2)加載配置
systemctl daemon-reload
(3)重啟docker服務
systemctl restart docker