在 /etc/docker/daemon.json 中写入如下内容(如果文件不存在请新建该文件):
{
"registry-mirrors": [
"https://hub-mirror.c.163.com",
"https://mirror.baidubce.com"
]
}
之后重新启动服务
sudo systemctl daemon-reload
sudo systemctl restart docker
{
"registry-mirrors": [
"https://hub-mirror.c.163.com",
"https://mirror.baidubce.com"
]
}
sudo systemctl daemon-reload
sudo systemctl restart docker