centos7镜像加速_docker 镜像加速CentOS7详细介绍

前言

在Docker Hub官网上注册帐号,即可下载使用仓库里的全部的docker镜像。而因为网络原因,国内的开发者没办法流畅的下载镜像,经常会出现下载中断的错误。解决方法就是使用国内的容器Hub加速服务,本质就是更改pull优先级较高的服务器为国内的站点。

国内docker镜像加速站

阿里云

DaoCloud

灵雀云

系统环境

操作系统: CentOS 7

docker版本: 1.9.1

DaoCloud加速

DaoCloud现在是提供一个一键脚本配置registry-mirror,然而对于上述环境是不起作用的。

执行docker守护服务的help命令,发现没有–registry-mirror这个选项,而是使用–add-registry选项。

具体命令如下:

$ sudo docker daemon -h

Usage: docker daemon [OPTIONS]

Enable daemon mode

--add-registry=[] Registry to query before a public one

--api-cors-header= Set CORS headers in the remote API

-b, --bridge= Attach containers to a network bridge

--bip= Specify network bridge IP

--block-registry=[] Don't contact given registry

--cluster-advertise= Address or interface name to advertise

--cluster-store= Set the cluster store

--cluster-store-opt=map[] Set cluster store options

--confirm-def-push=true Confirm a push to default registry

-D, --debug=false Enable debug mode

--default-gateway= Container default gateway IPv4 address

--default-gateway-v6= Container default gateway IPv6 address

--default-ulimit=[] Set default ulimits for containers

--disable-legacy-registry=false Do not contact legacy registries

--dns=[] DNS server to use

--dns-opt=[] DNS options to use

--dns-search=[] DNS search domains to use

-e, --exec-driver=native Exec driver to use

--exec-opt=[] Set exec driver options

--exec-root=/var/run/docker Root of the Docker execdriver

--fixed-cidr= IPv4 subnet for fixed IPs

--fixed-cidr-v6= IPv6 subnet for fixed IPs

-G, --group=docker Group for the unix socket

-g, --graph=/var/lib/docker Root of the Docker runtime

-H, --host=[] Daemon socket(s) to connect to

--help=false Print usage

--icc=true Enable inter-container communication

--insecure-registry=[] Enable insecure registry communication

--ip=0.0.0.0 Default IP when binding container ports

--ip-forward=true Enable net.ipv4.ip_forward

--ip-masq=true Enable IP masquerading

--iptables=true Enable addition of iptables rules

--ipv6=false Enable IPv6 networking

-l, --log-level=info Set the logging level

--label=[] Set key=value labels to the daemon

--log-driver=json-file Default driver for container logs

--log-opt=map[] Set log driver options

--mtu=0 Set the containers network MTU

-p, --pidfile=/var/run/docker.pid Path to use for daemon PID file

--registry-mirror=[] Preferred Docker registry mirror

-s, --storage-driver= Storage driver to use

--selinux-enabled=false Enable selinux support

--storage-opt=[] Set storage driver options

--tls=false Use TLS; implied by --tlsverify

--tlscacert=~/.docker/ca.pem Trust certs signed only by this CA

--tlscert=~/.docker/cert.pem Path to TLS certificate file

--tlskey=~/.docker/key.pem Path to TLS key file

--tlsverify=false Use TLS and verify the remote

--userland-proxy=true Use userland proxy for loopback traffic

在文件/etc/sysconfig/docker中增加以下代码:

ADD_REGISTRY='--add-registry [你的加速站网址]'

然后,重启Docker就可以了。

sudo systemctl daemon-reload

sudo service docker restart

使用镜像加速

1.拉取镜像前请先登录: docker login daocloud.io(请使用用户名进行 login)

2.docker pull [你需要的镜像]

后续

经过使用测试:下载docker镜像时不再出现下载失败提示,粗略估计下载速度在200k/s左右,基本满足使用需求。

感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/542011.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

java 根据类名示例化类_Java LocalDateTime类| atOffset()方法与示例

java 根据类名示例化类LocalDateTime类atOffset()方法 (LocalDateTime Class atOffset() method) atOffset() method is available in java.time package. atOffset()方法在java.time包中可用。 atOffset() method is used to create an OffsetDateTime to merge this LocalDat…

Zabbix监控——proxy 分布式监控配置

proxy分布式监控 Zabbix proxy是在大规模分布式监控场景中,采用的一种用以分担server端压力的分层结构, proxy可以代替zabbix server检索客户端的数据,然后把数据汇报给zabbix server,极大的减轻了server的负载压力,使…

AutoCAD_acadiso.dwt卡死

2019独角兽企业重金招聘Python工程师标准>>> 问题描述:每次执行到打开acadiso.dwt就卡死,且电脑显示有网,确打不开网页 可能原因:可能是因为AotuCAD是盗版的 解决办法: 1.在任务管理器中把WSCommCntr.exe进…

else 策略模式去掉if_java – 用状态/策略模式替换if/else逻辑

我认为你应该使用GoF模式Chain of responsibility.你应该引入两个接口:1)你将检查正确条件的条件,例如“如果zip文件不存在”并返回布尔结果 – 如果条件满足则返回“true”,否则“else”,2)执行策略,它将运行分配有条件的动作,例如: “从指定的URL下载它…

docker简介与搭建

1 . 对docker的理解: Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的镜像中,然后发布到任何流行的 Linux或Windows 机器上,也可以实现虚拟化。容器是完全使用沙箱机制,相互之间…

Java BigInteger类| toByteArray()方法与示例

BigInteger类testBit()方法 (BigInteger Class testBit() method) testBit() method is available in java.math package. testBit()方法在java.math包中可用。 testBit() method is used to convert this BigInteger to a byte [] that holds 2s complement denotation of thi…

007_Web to lead

转载于:https://www.cnblogs.com/bandariFang/p/6229491.html

设置header_Nginx的这些安全设置,你都知道吗?

Nginx 是最流行的 Web 服务器,可以只占用 2.5 MB 的内存,却可以轻松处理 1w 的 http 请求。做为网站的入口,Nginx 的安全设置重要性不言而喻。下面带你一起去认识一下这些安全配置吧!nginx.conf是 Nginx 最主要的配置文件&#xf…

动态路由协议_动态路由协议的类别

动态路由协议Dynamic routing protocols have been divided into 2 categories i.e Distance vector protocols and Link state protocols. Both of these protocols are being explained in detail in this tutorial. 动态路由协议分为距离矢量协议和链路状态协议两大类 。 本…

docker镜像创建与优化

1 . 创建镜像 有两种方法构建镜像: docker commit :将运行的容器保存成镜像Dockerfile:自动构建 使用docker commit 创建镜像分为三步: 运行容器修改容器将容器保存为镜像 举例: [rootdocker ~]# docker load -i…

ISP运营商实验室测试机架拓扑搭建经验分享

大家好,有些日子没更新干货了,近期难得有假期进行修整,思前顾后还是坐下来聊聊自己长期负责维护和搭建的实验室环境。废话不多说,直接上图。因为图较大,分上下部分进行上传。网络主框架(上)服务…

关于二手交易用户指南怎么写_让用户拍案叫绝文案怎么写?试试这3个方法

“共鸣”到底是什么? 为什么有些文章会引起共鸣,而有些则没有。现在假设为产品家用手持式美容仪写一份副本。 由于主要重点是“家庭使用”,因此您立即想到了“家庭美容”的口号。 尽管这句话很简单易懂,但谈论起来总是很简单……似…

结构化程序goto语句_C ++ goto语句| 查找输出程序| 套装1

结构化程序goto语句Program 1: 程序1&#xff1a; #include <iostream>#include <math.h>using namespace std;int main(){int num1 1;int num2 0;MY_LABEL:num2 num1 * num1;cout << num2 << " ";num1 num1 pow(2, 0);if (num1 < …

docker仓库搭建、加密、用户认证

1 . 含义及理解&#xff1a; 仓库分为公开仓库&#xff08;Public&#xff09;和私有仓库&#xff08;Private&#xff09;两种形式。最大的公开仓库是 Docker Hub&#xff0c;存放了数量庞大的镜像供用户下载。 国内的公开仓库包括 Docker Pool等&#xff0c;可以提供大陆用户…

Centos7+Nginx+Keepalived实现Apache服务的高可用负载均衡

Centos7NginxKeepalived实现Apache服务的高可用&负载均衡今天是2017年的第一天&#xff0c;昨天也就是2016年的最后一天&#xff0c;我尝试部署了Centos7NginxKeepalived实现WEB服务的高可用负载均衡服务&#xff0c;终于在2017年的第一天前完成了&#xff0c;所以在此分享…

客户端通过网口启动可过去的ip_西安交通大学16年3月课程考试《网络组网技术综合训练》作业考核试题...

西安交通大学16年3月课程考试《网络组网技术综合训练》作业考核试题一、单选题(共 20 道试题&#xff0c;共 40 分。)V 1. 下列不属于服务器内部结构的是()A. CPUB. 电源C. 5类双绞线D. 北桥芯片满分&#xff1a;2 分2. 网络中使用光缆的优点是()A. 便宜B. 容易安装C. 是一个工…

mcq 队列_MCQ | 软件工程基础知识/简介(1)

mcq 队列Q1. Which of the following is a part of the software? Q1。 以下哪个是软件的一部分&#xff1f; Programs 程式 Documentation 文献资料 Operating Procedures 运营流程 All of the above 上述所有的 Answer: d. All of the above 答案&#xff1a; d。 上述所有…

docker设置镜像加速器

设置镜像加速器 一般情况下&#xff0c;直接从官方仓库中直接拉取镜像会比较慢&#xff0c;可以设置镜像加速器&#xff0c;相当于一个反向代理。以阿里云为例 1 . 首先获取自己的加速器地址 www.aliyun.com 登陆自己的账号&#xff08;可以是支付宝账号&#xff09; 首页点…

keytool条目_java keytool 常用命令

最近在做ssl连接active directory&#xff0c; 遇到了不少的ssl的问题。连接ssl时会需要用将证书保存到keystore&#xff0c; 而这个步骤刚好就用到了keytool命令。直接敲keytool会有提示如何用这个命令&#xff0c; 但对于完全不懂的我&#xff0c;还是找了下基本命令&#xf…

用JavaScript中的示例进行fill()函数

fill() is a predefined function in JavaScript, which is used to fill all elements of an array with a static value. fill()是JavaScript中的预定义函数&#xff0c;用于用静态值填充数组的所有元素。 Example: 例&#xff1a; <html><head><title>J…