Pulling images from sources outside China, such as Docker Hub, GCR, and Quay, can fail due to network issues. The artifact subscription feature allows a Container Registry (ACR) Enterprise instance to sync images from sources outside China or custom sources directly to your image repositories. No additional network configuration is required.
Scope
This feature is available only for ACR Enterprise instances. The quota for subscription rules varies by instance. For more information, see Artifact subscription.
Set up automatic subscription
After you set up an automatic subscription, the ACR Enterprise instance automatically syncs images to the destination image repository based on the specified rules.
Log on to the Container Registry console.
In the top menu bar, select a region. In the navigation pane on the left, choose Instances.
On the Instances page, click the target Enterprise instance. In the navigation pane on the left, choose .
On the Artifact Subscription page, click Create Subscription Rule. In the dialog box that appears, set the following parameters and then click Next.
Parameter
Description
Artifact Source
Select the source outside China that you want to subscribe to.
Source Repository Domain Name
This option is displayed and required only when you set Artifact Source to Custom Source.
The domain name of the custom source. For example, to sync images from the OpenAnolis community, you can enter
anolis-registry.cn-zhangjiakou.cr.aliyuncs.com.Source Repository Location
The coordinate of the source image repository outside China. The format is <namespace>/<repository>. For example,
library/nginx.Subscription Policy
Subscribe to the image tag .* in the source repository (Required): The regular expression that the image versions from the source must match. The default value is .*, which means all image versions in the source repository are subscribed to.
Subscribe to the first N images in the source repository (Required): The number of the most recent image versions that match the regular expression to sync to the destination repository in your Enterprise instance. The limit for Docker Hub is 5 image versions. The limit for other sources is 30 image versions.
OS/Architecture
If the source repository contains multi-architecture images, only images for the specified operating system or architecture are synced to the destination repository in your Enterprise instance.
On the Image Repository page, complete the other configurations, and then click Create Subscription Rule.
Parameter
Description
Repositories
The destination image repository where the subscription rule applies.
Overwrite Image
Specifies whether to overwrite an existing image with the same name in the destination repository of the Enterprise instance.
Acceleration Link
Improves the image subscription speed based on scheduling policies and network link optimization.
Update Period
Periodically syncs image tags from the source repository to the destination repository in the Enterprise instance.
The ACR Enterprise instance will then automatically sync images based on the subscription rule. To use an image before the automatic synchronization occurs, see Run an immediate sync.
Run an immediate sync
You can run a subscription policy immediately to sync images.
Log on to the Container Registry console.
In the top menu bar, select a region. In the navigation pane on the left, choose Instances.
On the Instances page, click the target Enterprise instance. In the navigation pane on the left, choose .
On the Artifact Subscription page, find the subscription policy that you want to run. In the Actions column, click Execute Now.
In the Notice dialog box, click OK.
After the tracking task is complete, you can view the synced image in the destination image repository.