1.创建docker daemon.json
sudo mkdir -p /etc/docker
2.添加docker镜像加速地址
sudo tee /etc/docker/daemon.json <<-'EOF' { "registry-mirrors": ["https://阿里云镜像加速地址.mirror.aliyuncs.com"] } EOF
3.重启守护进程
sudo systemctl daemon-reload
4.重启服务
sudo systemctl restart docker