登录阿里云文章源自随机的未知-https://sjdwz.com/11162.html
点击右上角控制台文章源自随机的未知-https://sjdwz.com/11162.html
点击左上角文章源自随机的未知-https://sjdwz.com/11162.html
找到容器服务下的容器镜像服务。文章源自随机的未知-https://sjdwz.com/11162.html
点击进入后文章源自随机的未知-https://sjdwz.com/11162.html
再点击镜像工具文章源自随机的未知-https://sjdwz.com/11162.html
点击镜像加速器文章源自随机的未知-https://sjdwz.com/11162.html
从此处可以看到镜像加速命令文章源自随机的未知-https://sjdwz.com/11162.html
根据自己的操作系统选择不同的加速命令。我的是centos,所以我选择centos系统的命令进行操作。文章源自随机的未知-https://sjdwz.com/11162.html
如果是root账户登录,不用输入sudo即可。文章源自随机的未知-https://sjdwz.com/11162.html
涂黑部分是你自己的加速器地址。文章源自随机的未知-https://sjdwz.com/11162.html
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["你的加速器地址"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
上面的命令是新建一个docker目录,然后把加速器地址配置到daemon.json 中。文章源自随机的未知-https://sjdwz.com/11162.html
后面重启镜像,重启docker。文章源自随机的未知-https://sjdwz.com/11162.html