Get the App
SLTechnology News&Howtos  ›  Servers  › 

An example Analysis of the acceleration of Docker official Image in China

Shulou Source: shulou.com Published: 2022-05-31 20:15:25 09月22日 Update

Editor to share with you the example analysis of Docker China's official image acceleration, I believe most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's learn about it!

Docker China's official image acceleration

Through the acceleration of Docker official images, users in China can quickly access the most popular Docker images. The image is hosted on Chinese mainland, and local users will now enjoy faster download speeds and greater stability, allowing them to develop and deliver Docker-based applications more agile.

Docker China's official image acceleration can be accessed through registry.docker-cn.com. The mirror library contains only popular public images. Private mirrors still need to be pulled from the American Mirror Library.

You can pull directly from the accelerated address of the image using the following command:

$docker pull registry.docker-cn.com/myname/myrepo:mytag

For example:

$docker pull registry.docker-cn.com/library/ubuntu:16.04

Note: unless you modify the `- registry- mirror` parameter of the Docker daemon (see below), you will need to fully specify the name of the official image. For example, library/ubuntu, library/redis, library/nginx.

Use-- registry-mirror to configure the Docker daemon

You can configure the Docker daemon to use Docker official image acceleration by default. In this way, you can accelerate the pull of the image through the official image by default, without the need to specify registry.docker-cn.com for each pull.

You can pass in the-- registry-mirror parameter when the Docker daemon starts:

$docker-- registry-mirror= https://registry.docker-cn.com daemon

To preserve the changes permanently, you can modify the / etc/docker/daemon.json file and add the registry-mirrors key value.

{"registry-mirrors": ["https://registry.docker-cn.com"]}"

Restart Docker after modification and save to make the configuration effective.

Note: you can also use Docker for Mac and Docker for Windows to set up.

The above is all the contents of the article "sample Analysis of Docker China's official Image acceleration". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Mirror official China process article configuration example analysis content parameters user agile not so much can make name command address most mainland file Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS MariaDB Shulou Tech Info Shulou Technology Shulou Information