You can configure synchronization rules to automatically synchronize images from a source instance to a destination instance. By default, images are automatically synchronized between instances that reside in different regions.

Prerequisites

Make sure that the source instance is a Container Registry Enterprise Edition instance of the Standard Edition or Advanced Edition. Images cannot be synchronized from a Container Registry Enterprise Edition instance of the Basic Edition. The destination instance can be a Container Registry Enterprise Edition instance of the Basic Edition, Standard Edition, or Advanced Edition.
Note To upgrade a Container Registry Enterprise Edition instance, find the instance on the Instances page and click Upgrade in the lower-right corner.

Usage notes

Images can be synchronized by namespace or image repositories.
  • Synchronize images from a namespace of the source instance: The destination instance must have a namespace that has the same name as the source namespace and can automatically create repositories.
  • Synchronize images from an image repository of the source instance: The destination instance must have a namespace and image repository that have the same name as the source namespace and source image repository.

Procedure

  1. Log on to the Container Registry console.
  2. In the top navigation bar, select a region.
  3. In the left-side navigation pane, click Instances.
  4. On the Instances page, click the required Container Registry Enterprise Edition instance.
  5. On the management page of the Container Registry Enterprise Edition page, choose Distribution > Instance Replication.
  6. Create a synchronization rule.
    Note
    • If an instance is already specified as a source or destination instance in an existing synchronization rule, you cannot use the instance as the destination instance in a new rule.
    • If an instance is already specified as a destination instance in an existing synchronization rule, you cannot use the instance as the source or destination instance in a new rule.
    1. On the Global Distribution page, click Create Rule.
    2. In the Create Rule dialog box, set the parameters in the Instance Information step and click Next.
      • Rule Name: the name of the synchronization rule.
      • Target Instance: Select the region where the destination instance resides and select the destination instance.
      Note Images can be automatically synchronized across regions when access over the Internet is disabled. This prevents security risks that are caused by access over the Internet.
    3. In the Replication Information step, set the parameters and click Create Rule.
      • Replication Level: Select Namespaces or Repository.
      • Source Address: Select the namespace and repository from which you want to synchronize images. Enter a regular expression to filter image tags.

Results

After the synchronization rule is created, a synchronization task is automatically triggered when a new image is uploaded to the repository whose name matches the specified synchronization rule.

On the management page of the instance, choose Distribution > Replication Record. On the page that appears, you can view synchronization tasks.