sudo docker pull hello-world
Using default tag: latest
Error response from daemon: error parsing HTTP 408 response body: invalid character '<' looking for beginning of value: "<html><body><h1>408 Request Time-out</h1>\nYour browser didn't send a complete request in time.\n</body></html>\n"
1、注册登陆阿里云(https://cr.console.aliyun.com/cn-hangzhou/instances/mirror)
2、来到以下这里——镜像加速器(你将看到一个属于自己的加速器地址)
3、接下来按以下命令执行
sudo mkdir -p /etc/docker
改为自己的地址
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://XXXX.mirror.aliyuncs.com"]
}
EOF
使更改生效
sudo systemctl daemon-reload
重启docker
sudo systemctl restart docker
查看一下docker状态,绿了就对了
sudo systemctl status docker