1.現象
如果直接docker pull CentOS 你會發現很慢
2.解決
[root@localhost network-scripts]# vi /etc/docker/daemon.json
{
"registry-mirrors": ["https://mj9kvemk.mirror.aliyuncs.com"]
}
重新開機docker
[root@localhost docker]# systemctl restart docker
重新拉取,秒秒鐘
[root@localhost docker]# docker pull centos
Using default tag: latest
Trying to pull repository docker.io/library/centos ...
latest: Pulling from docker.io/library/centos
8ba884070f61: Pull complete