这个报错是因为运行的镜像hello-world本地不存在,同时远程的镜像仓库无法访问。
解决方案:
手动修改镜像源
修改docker目录下daemon.json 文件,路径是 /etc/docker/daemon.json , 修改成以下内容
{
"registry-mirrors": ["https://dc.j8.work","https://docker.1panel.live"]
}
命令如下:
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://dc.j8.work","https://docker.1panel.live"]
}
EOF
重启docker即可使用
sudo systemctl daemon-reload
sudo systemctl restart docker