- Change the image source, the system does not have this file, add this file directly
vim /etc/docker/daemon.json
{
“registry-mirrors”:[“https://registry.docker-cn.com”]
}
-
Docker China official mirror
https://registry.docker-cn.com -
Netease
http://hub-mirror.c.163.com -
USTC
https://docker.mirrors.ustc.edu.cn -
University of Science and Technology of China
https://docker.mirrors.ustc.edu.cn -
Alibaba Cloud Container Service
https://cr.console.aliyun.com/
- Restart docker after changing the image
systemctl restart docker
3. Check whether docker runs successfully
ps -ef |grep docker
4. docker view local mirror
dicker images
5. docker download, the default is to download the latest
docker pull nginx
6. Download the specified version
docker pull nginx:1.12
7. Delete the image
docker image rm <id|name>
or
docker rmi <id|name>