Docker for domestic source

  1. 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/

  1. 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>

Published 44 original articles · liked 0 · visits 1226

Guess you like

Origin blog.csdn.net/weixin520520/article/details/105002084