0


docker 设置国内镜像源

一、国内加速地址

1.Docker中国区官方镜像https://registry.docker-cn.com

2.网易http://hub-mirror.c.163.com

3.ustchttps://docker.mirrors.ustc.edu.cn

4.中国科技大学https://docker.mirrors.ustc.edu.cn

5.阿里云容器 生成自己的加速地址

登录:cr.console.aliyun.com

点击“创建我的容器镜像”,得到专属加速地址。

二、修改方法

创建或修改 /etc/docker/daemon.json 文件,修改为如下形式

{
    "registry-mirrors": [
        "https://registry.hub.docker.com",
        "http://hub-mirror.c.163.com",
        "https://docker.mirrors.ustc.edu.cn",
        "https://registry.docker-cn.com"
    ]
}

加载重启docker

systemctl restart docker

查看是否成功

docker info

三、从指定repo拉取镜像

命令格式:

library/<image:version>
$ docker pull busybox 

# 等价于:
$ docker pull docker.io/library/busybox:latest
$ docker pull registry.hub.docker.com/library/busybox:latest
标签: docker 容器 运维

本文转载自: https://blog.csdn.net/muzihuaner/article/details/131256377
版权归原作者 木子欢儿 所有, 如有侵权,请联系我们删除。

“docker 设置国内镜像源”的评论:

还没有评论