docker如何设置国内镜像源

2020-08-12 13:45:13

首先打开/etc/docker/daemon.json文件,然后按如下形式进行修改即可:

# vi /etc/docker/daemon.json{    "registry-mirrors": ["http://hub-mirror.c.163.com"]//这里设置国内镜像源的地址}systemctl restart docker.service

国内加速地址有:

Docker中国区官方镜像

https://registry.docker-cn.com

网易

http://hub-mirror.c.163.com

中国科技大学

https://docker.mirrors.ustc.edu.cn