1.找到阿里云镜像加速地址(https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors) https://XXX.mirror.aliyuncs.com 2. docker文件 other_args="--registry-mirror=https://XXX.mirror.aliyuncs.com" 3.servier docker restart 4.ps -ef|grep docker 如果 docker进程格式为/user/bin/docker --registry-mirror=https://XXX.mirror.aliyuncs.com 则 配置镜像加速成功 如果是centos7或以上,则编写 /etc/docker/daemon.json 文件,文件内容为: { "registry-mirrors": ["https://XXX.mirror.aliyuncs.com"] } 直接执行代码为: sudo mkdir -p /etc/docker sudo tee /etc/docker/daemon.json <<-'EOF' { "registry-mirrors": ["https://XXX.mirror.aliyuncs.com"] } EOF sudo systemctl daemon-reload sudo systemctl restart docker