Alibaba Cloud Container Image Service

1. Mirror accelerator

If we have purchased an Alibaba Cloud server and installed Docker in the server, then after installing Docker, we can configure Alibaba Cloud's image accelerator; the advantage of using the image accelerator is that generally we want to pull images from Docker Hub Pull up, but this site is in a foreign country, it is very inconvenient for us to use, the download is very slow, and the domestic Alibaba Cloud has the mirror that has been pulled for us to use directly, but if we use the mirror Alibaba There is no cloud on the cloud, so we can also use the Alibaba Cloud image accelerator to pull the image.

Steps to obtain the image accelerator:

Log in to the official website of Aliyun (https://www.aliyun.com/)-click on the console-products and services-container image service-image center-image accelerator

For example: After
Insert picture description here
obtaining the configuration command corresponding to the mirror accelerator, perform the four-step operation in order to succeed!

2. Mirror warehouse

After we have customized a Docker image, we can push it to the Docker Hub, which is a foreign website; just like our usual code hosting center Github, just register an account on it and publish our Docker image. Others can find our mirror from Docker Hub. There is also a similar code hosting center Gitee (Code Cloud) in China. One advantage of using domestic websites is that the speed is relatively fast, so sometimes we choose domestic websites for convenience; Alibaba Cloud also has a service similar to Docker Hub function, which is container mirroring. For the mirror warehouse in the service, we can usually publish our own mirror to the mirror warehouse.

Steps to access the mirror warehouse:

Log in to the official website of Aliyun (https://www.aliyun.com/)-click on the console-products and services-container mirroring service-default instance-mirror warehouse

The first time we use the mirror warehouse, we will first create a namespace, and then the mirror warehouse created can specify the namespace. An account can create up to 3 namespaces, and they cannot be modified after creation, so before creating the namespace You should think about the name first, don't create it randomly.

When creating a mirror warehouse, after filling in some relevant information about the warehouse, we will be asked to select the code source, usually a local warehouse.
Insert picture description here
After we have created the mirror warehouse, click "Manage" on the right side of the mirror warehouse to view the operation guide of the mirror warehouse. There will be very detailed commands to teach us how to log in to the Alibaba Cloud Docker Registry, how to pull the image, and how to publish the image ;For example:
Insert picture description here
【Points to note】

  1. The first time we use Alibaba Cloud's mirror warehouse, we need to set a password for the mirroring service. If we do not set this password, directly enter the password of the Alibaba Cloud account when logging in to the Alibaba Cloud Docker Registry, then it will prompt:Error response from daemon: Get https://registry.cn-hangzhou.aliyuncs.com/v2/: unauthorized: authentication required

    At this time, we only need to go to the container mirroring service-default instance-mirror warehouse-access credentials-set a fixed password, set a password for the mirroring service
    Insert picture description here

  2. Don’t forget to tag the mirror before releasing the mirror, otherwise you cannot push normally

  3. The name of the mirror warehouse we created should be consistent with the name of the mirror to be published locally before it can be published to the mirror warehouse normally

Guess you like

Origin blog.csdn.net/can_chen/article/details/107298157