码迷,mamicode.com
首页 > 其他好文 > 详细

docker官方镜像修改为国内镜像

时间:2020-04-01 22:08:51      阅读:93      评论:0      收藏:0      [点我收藏+]

标签:nbsp   arp   速度   log   emctl   doc   res   reload   daemon   

参考:https://www.cnblogs.com/icebutterfly/p/9489133.html


使用docker拉取镜像时,会出现链接超时错误。因为官方镜像访问速度太慢,所以报错,修改为国内镜像可以解决这个问题,操作如下:


在linux系统上,修改 /etc/docker/daemon.json 文件配置
1、执行命令,进入daemon.json配置文件

vim /etc/docker/daemon.json

 

2、修改配置文件为(可自行加减国内镜像地址),然后保存

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

  

3、执行命令,重启docker

sudo systemctl daemon-reload
sudo systemctl restart docker

  

docker官方镜像修改为国内镜像

标签:nbsp   arp   速度   log   emctl   doc   res   reload   daemon   

原文地址:https://www.cnblogs.com/fish3yu/p/12616291.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!