安于心

文章 分类 评论
7 1 22662

站点介绍

这里是站点介绍...

wuqu 发布的文章

Your description here.

Docker 容器连接

Docker 容器连接前面我们实现了通过网络端口来访问运行在 docker 容器内的服务。容器中可以运行一些网络应用,要让外部也可以访问这些...

Docker 镜像使用

Docker 镜像使用当运行容器时,使用的镜像如果在本地中不存在,docker 就会自动从 docker 镜像仓库中下载,默认是从 Dock...

wuqu

Docker 镜像加速

2023-07-19 14:52

Docker 镜像加速
国内从 DockerHub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务,例如:

科大镜像:https://docker.mirrors.ustc.edu.cn/
网易:https://hub-mirror.c.163.com/
阿里云:https://<你的ID>.mirror.aliyuncs.com
七牛云加速器:https://reg-mirror.qiniu.com
当配置某一个加速器地址之后,若发现拉取不到镜像,请切换到另一个加速器地址。国内各大云服务商均提供了 Docker 镜像加速服务,建议根据运行 Docker 的云平台选择对应的镜像加速服务。

阿里云镜像获取地址:https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors,登陆后,左侧菜单选中镜像加速器就可以看到你的专属地址了:

图片[1]-Docker 镜像加速-6.2

之前还有 Docker 官方加速器 https://registry.docker-cn.com ,现在好像已经不能使用了,我们可以多添加几个国内的镜像,如果有不能使用的,会切换到可以使用个的镜像来拉取。

Ubuntu14.04、Debian7Wheezy
对于使用 upstart 的系统而言,编辑 /etc/default/docker 文件,在其中的 DOCKER_OPTS 中配置加速器地址:

DOCKER_OPTS="--registry-mirror=https://registry.docker-cn.com"
重新启动服务:

$ sudo service docker restart
Ubuntu16.04+、Debian8+、CentOS7
对于使用 systemd 的系统,请在 /etc/docker/daemon.json 中写入如下内容(如果文件不存在请新建该文件):

{"registry-mirrors":["https://reg-mirror.qiniu.com/"]}
之后重新启动服务:

$ sudo systemctl daemon-reload
$ sudo systemctl restart docker
Windows 10
对于使用 Windows 10 的系统,在系统右下角托盘 Docker 图标内右键菜单选择 Settings,打开配置窗口后左侧导航菜单选择 Daemon。在 Registrymirrors 一栏中填写加速器地址 https://docker.mirrors.ustc.edu.cn/ ,之后点击 Apply 保存后 Docker 就会重启并应用配置的镜像地址了。

图片[2]-Docker 镜像加速-6.2

Mac OS X
对于使用 Mac OS X 的用户,在任务栏点击 Docker for mac 应用图标-> Perferences…-> Daemon-> Registrymirrors。在列表中填写加速器地址 https://reg-mirror.qiniu.com 。修改完成之后,点击 Apply&Restart 按钮,Docker 就会重启并应用配置的镜像地址了。

图片[3]-Docker 镜像加速-6.2

检查加速器是否生效
检查加速器是否生效配置加速器之后,如果拉取镜像仍然十分缓慢,请手动检查加速器配置是否生效,在命令行执行 docker info,如果从结果中看到了如下内容,说明配置成功。

$ docker info
Registry Mirrors:
https://reg-mirror.qiniu.com

JVS常见问题–部署无法成功

部署基础数据存储模块docker-compose -f docker-compose-db.yml up -d执行docker ps 检查...

漏洞及渗透练习平台

漏洞及渗透练习平台:WebGoat漏洞练习环境https://github.com/WebGoat/WebGoathttps://githu...

热门文章

最新评论

  • agusehimuz

    Research shows that purchasing medications online can be convenient. Acquire your prescription for [URL=https://atplearningpromo.com/item/amoxicillin/]500mgmm amoxil to purchase[/URL] without hassle. Considering various options to control your BPH symptoms? Find out about how you can obtain lotrisone on the internet, offering a straightforward solution to ease discomfort. Various individuals seek effective therapy for their condition, and now you can secure https://karachigo.com/zoloft/ quickly via internet, offering a practical pathway to managing your health.

  • Davidfet

    prednisone 1 tablet [url=https://buyprednisone.store/#]100 mg prednisone daily[/url] order prednisone online no prescription

  • amiakehacoc

    Keeping your health in paramount condition, the necessity to procure medication without hassle is vital. For those seeking a reliable remedy, clicking here [URL=https://drgranelli.com/item/kamagra/]best price generic kamagra online prescription[/URL] allows you to get your essentials swiftly and effectively. Discover the most economical rates for your heart health needs with kamagra cost . Harness optimal wellness with natural solutions; discover how you can https://sadlerland.com/herbolax/ for smooth digestive health management.

  • Deborahthilt

    Many thanks, Plenty of facts. previous [url=https://shallbd.com/id/memahami-mekanisme-perdagangan-di-diablo-3-panduan-komprehensif/]more about the author[/url] continued https://shallbd.com/tr/isvec-kronunun-dolar-karsisindaki-mevcut-durumu/

  • 역삼동안마

    Today, while I was at work, my cousin stole my iphone and tested to see if it can survive a forty foot drop, just so she can be a youtube sensation. My iPad is now broken and she has 83 views. I know this is completely off topic but I had to share it with someone!

  • inuvofis

    I discovered that you can secure [URL=https://drgranelli.com/lowest-price-nizagara/]nizagara[/URL] with no trouble when you look on the internet. Visit our website to discover the most competitive buy kamagra online canada . Order your supply today for enhanced health and vitality. Receive unparalleled savings on your purchase by exploring https://transylvaniacare.org/kamagra/, where you can buy your crucial wakefulness-promoting agent digitally.

  • 출장마사지

    Hi there! Someone in my Myspace group shared this site with us so I came to check it out. I'm definitely enjoying the information. I'm book-marking and will be tweeting this to my followers! Fantastic blog and brilliant design and style.

  • CharlesNer

    http://amoxil.cheap/# generic for amoxicillin cost of lisinopril 40 mg [url=http://lisinopril.top/#]lisinopril tabs 20mg[/url] where to buy lisinopril online

  • CharlesNer

    https://furosemide.guru/# lasix side effects lisinopril 20 mg prices [url=http://lisinopril.top/#]lisinopril 2019[/url] generic drug for lisinopril

  • Davidfet

    lasix uses [url=http://furosemide.guru/#]lasix generic name[/url] lasix 100mg

日历

2024年02月

    123
45678910
11121314151617
18192021222324
2526272829  

标签云

友情链接

推荐关键字:

配色方案