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.pswp.cn/news/542011.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/542011.shtml
英文地址,請注明出處:http://en.pswp.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…