Docker Image Acceleration CentOS7 Detailed introduction _docker

Source: Internet
Author: User
Tags iptables docker hub

Objective

In the Docker hub official online registration account, you can download the use of all the Docker image in the warehouse. And because of the network reason, the domestic developer does not have the means to be able to smoothly download the mirror, often can appear the download interruption error. The solution is to use the domestic container Hub accelerator service, the essence is to change the pull priority server for the domestic site.

Domestic Docker Mirror Acceleration Station

Aliyun
Daocloud
Ling Que yun

System environment

Operating system: CentOS 7
Docker version: 1.9.1

Daocloud acceleration

Daocloud is now providing a one-click script Configuration Registry-mirror, but it does not work for these environments.

Execute the help command for the Docker Daemon service and find that there is no –registry-mirror this option, but instead use the –add-registry option.

The specific orders are as follows:

$ sudo docker daemon-h usage:docker daemon [OPTIONS] Enable daemon mode--add-registry=[] registry to Quer Y before a public one--api-cors-header= Set cors headers in the remote api-b,--bridge= Attach con Tainers to a network bridge--bip= specify Network Bridge IP--block-registry=[] Don ' t contact GI Ven registry--cluster-advertise= address or interface name to advertise--cluster-store= Set the Clus ter store--cluster-store-opt=map[] Set cluster store options--confirm-def-push=true confirm a push to Defau Lt registry-d,--debug=false Enable debug mode--default-gateway= Container default gateway IPV4 addr ESS--default-gateway-v6= Container default gateway IPV6 address--default-ulimit=[] Set default Ulimits For containers--disable-legacy-registry=false does not contacts Legacy registries--dns=[] DNS server to U        Se--dns-opt=[]     DNS options to use--dns-search=[] DNS search domains to use-e,--exec-driver=native exec driver T o 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 Commu Nication--insecure-registry=[] Enable insecure registry communication--ip=0.0.0.0 Default IP when b Inding container ports--ip-forward=true enable Net.ipv4.ip_forward--ip-masq=true enable IP Masquer Ading--iptables=true Enable addition of iptables rules--ipv6=false enable IPV6 networking-l,-         -log-level=infoSet the logging level--label=[] Set Key=value labels to the daemon--log-driver=json-file Default D River for container logs--log-opt=map[] Set log driver options--mtu=0 Set the containers netwo RK 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 --storage-opt=[] Set Storage driver Options--tls=false use TLS;     Implied by--tlsverify--tlscacert=~/.docker/ca.pem Trust Certs signed a 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

Add the following code to the file/etc/sysconfig/docker:

add_registry= '--add-registry [Your accelerator station URL] '

Then, reboot the Docker will be OK.

sudo systemctl daemon-reload 

sudo service docker restart

Using mirrored acceleration

1. Please login before drawing mirror: Docker login Daocloud.io (please login with username)

2.docker Pull [mirrors you need]

Subsequent

After using the test: Download Docker mirror no longer appear download failure prompts, rough estimate download speed around 200k/s, basically meet the needs of use.

Thank you for reading, I hope to help you, thank you for your support for this site!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.