怎么修改拉取源从指定的国内仓库拉取镜像?

由于docker hub下载速度很慢,一个70M的镜像,要下载很久,

1
2
3
4
5
6
7
8
9
10
11
12
mkdir -p /etc/docker
tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://rgr5cdlp.mirror.aliyuncs.com"],
"runtimes": {
"nvidia": {
"path": "/usr/bin/nvidia-container-runtime",
"runtimeArgs": []
}
}
}
EOF

ss

1
2
systemctl daemon-reload
systemctl restart docker