当在拉取镜像时报以下错误时,可以通过更换镜像源解决。
1.更改镜像源
vi /etc/docker/daemon.json
#插入以下内容
{
"registry-mirrors": [
"https://docker.anyhub.us.kg",
"https://dockerhub.jobcher.com",
"https://dockerhub.icu"
]
}
2.重启docker
sudo systemctl daemon-reload
sudo systemctl restart docker