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.
- 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.
- Log on to the Container Registry console.
- In the top navigation bar, select a region.
- In the left-side navigation pane, click Instances.
- On the Instances page, click the required Container Registry Enterprise Edition instance.
- On the management page of the Container Registry Enterprise Edition page, choose .
- 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.
- On the Global Distribution page, click Create Rule.
- In the Create Rule dialog box, set the parameters in the Instance Information step and click Next.
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.
- Rule Name: the name of the synchronization rule.
- Target Instance: Select the region where the destination instance resides and select the destination instance.
- 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.
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. On the page that appears, you can view synchronization tasks.