Docker using Aliyun Docker Mirror Library Acceleration (Revised edition)

Source: Internet
Author: User
Tags ssh docker toolbox aliyun

I see this blog has a high click rate, but the tutorial is good and detailed, time is long, things have changed, the tutorial has become a useless tutorial.
With the Docker update, the previous method of modifying the source has not been applied
Today, I installed the next docker18.02ce version, found that the tutorial is not used, so make it up again
Vim/etc/docker/daemon.json This JSON file does not exist, no need to worry, direct edit
Put the following in, save, reboot

{
  ' registry-mirrors ': [' https://pee6w651.mirror.aliyuncs.com ']
}

If you think there is a problem with this address, you can change NetEase's
Http://hub-mirror.c.163.com

There is no need to look at the following, the old version of the reference,

Official image download is slow, so opened the Aliyun developer account,
Ali's documentation is wrong,

This sentence should read
sudo sed-i "s| execstart=/usr/bin/dockerd| Execstart=/usr/bin/dockerd–registry-mirror=https://pee6w651.mirror.aliyuncs.com|g "/etc/systemd/system/ Docker.service

The following all changes, if the Aliyun server can be changed to NetEase's
Execstart=/usr/bin/dockerd–registry-mirror=http://hub-mirror.c.163.com
Official Help

Aliyun Docker Mirror Library

Aliyun Container Hub Service: http://dev.aliyun.com/search.html

Container Hub services from the cloud

High-performance local registry provides full mirroring services for uploading, downloading, building, and hosting.

and to provide users with accelerators to speed up the official warehouse download. Accelerator use Help > Support: Http://console.d.aliyun.com/index2.html/?spm=0.0.0.0.Xx1dX0#/docker/booster

Aliyun Hub Service Management backstage: Http://console.d.aliyun.com/index2.html/?>spm=0.0.0.0.MVZTDP#/docker/image/list

By opening the Container hub service here, you can manage your own Docker warehouse and warehouse mirroring.

My exclusive accelerator address: https://pee6w651.mirror.aliyuncs.com

Ubuntu

Install or upgrade Docker

Please install the Docker of version 1.6.0. 
you can download it via Aliyun's mirrored warehouse: Mirrors.aliyun.com/help/docker-engine

curl-ssl http:// acs-public-mirror.oss-cn-hangzhou.aliyuncs.com/docker-engine/internet | SH-
Configure the Docker accelerator

you can use the following script to add the mirror configuration to the Docker daemon startup parameters.

echo "docker_opts=\"--registry-mirror=https://pee6w651.mirror.aliyuncs.com\ "| sudo tee-a/etc/default/docker
sudo service docker restart

Centos

Install or upgrade Docker

Please install the Docker of version 1.6.0. 
you can download it via Aliyun's mirrored warehouse: Mirrors.aliyun.com/help/docker-engine

curl-ssl http:// acs-public-mirror.oss-cn-hangzhou.aliyuncs.com/docker-engine/internet | SH-
Configure the Docker accelerator

you can use the following script to add the mirror configuration to the Docker daemon startup parameters.

# System Requirements CentOS more than 7, Docker more than 1.9.

sudo cp-n/lib/systemd/system/docker.service/etc/systemd/system/docker.service
sudo sed-i "s| Execstart=/usr/bin/docker daemon| Execstart=/usr/bin/docker Daemon--registry-mirror=https://pee6w651.mirror.aliyuncs.com|g "/etc/systemd/system/ Docker.service
sudo systemctl daemon-reload
sudo service docker restart

Windows

Installation or upgrade Docker

recommends that you install Docker Toolbox. 
Toolbox's introduction and help: Mirrors.aliyun.com/help/docker-toolbox 
Installation files directory for Windows systems: Mirrors.aliyun.com/docker-toolbox/windows

Quick Start

# Create a Linux virtual machine with a Docker environment installed Specifies that the machine name is default
docker-machine create-d virtualbox default

# To view the environment configuration of the machine and configure it locally. The Docker service is then accessed through the Docker client.
docker-machine env default
eval "$ (docker-machine env default)"
Docker info
configuration Docker Accelerator

You can add the mirror configuration to the startup parameters of Docker daemon using the following script.

docker-machine ssh Default "Echo ' Extra_args=\"--registry-mirror=https://pee6w651.mirror.aliyuncs.com\ "| sudo tee-a/var/lib/boot2docker/profile "

MacOS

 Installation or upgrade Docker recommends that you install Docker Toolbox. Introduction and Help for Toolbox: Mirrors.aliyun.com/help/docker-toolbox Mac System installation files directory: Mirrors.aliyun.com/docker-toolbox/mac Quick Start # Create a Linux virtual machine with a Docker environment, specifying that the machine name is default Docker-machine create-d virtualbox default # To view the environment configuration of the machine and configure it locally.
The Docker service is then accessed through the Docker client. Docker-machine env Default eval "$ (docker-machine env default)" Docker info configuration Docker Accelerator You can add a mirror configuration to a Docker Dae using the following script

Mon in the boot parameter. Docker-machine ssh Default "Echo ' Extra_args=\"--registry-mirror=https://pee6w651.mirror.aliyuncs.com\ "| sudo tee-a/var/lib/boot2docker/profile "docker-machine Restart default 

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.