我們國內使用官方Docker Hub倉庫實在是太慢了,很影響效率
使用命令編輯文件:
vim /etc/docker/daemon.json
加入下面的數據:
docker-cn鏡像:
{
"registry-mirrors": ["https://registry.docker-cn.com"]
}
如果你是騰訊雲的服務器那么請加入:
{
"registry-mirrors": ["https://mirror.ccs.tencentyun.com"]
}
阿里雲的服務器請查看:https://yq.aliyun.com/articles/29941
wq保存退出:
執行命令生效:
systemctl daemon-reload
systemctl restart docker
以上兩個源,我都測試過,如果你是騰訊雲那么肯定用騰訊雲的源最好,阿里同樣,速度飛快 image 秒 pull。