首先进入阿里云docker库首页 https://dev.aliyun.com/
1.点击管理中心

2.点击加速器

3.复制加速器地址

4.找到对应的文档

5.CentOS为例

直接把这段脚本放到控制台就好了
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["请填入您自己的加速器地址"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
网友评论