Pulling images from sources outside China, such as Docker Hub, GCR (Google Container Registry), and Quay, can fail due to network issues. Artifact subscription lets an ACR Enterprise instance automatically sync images from sources outside China or custom sources directly into your image repositories — no additional network configuration required.
Artifact subscription is available only for Basic and Premium editions of ACR Enterprise instances. The number of subscription rules you can create varies by instance. For quota details, see Artifact subscription.
Sync limits:
| Source | Maximum versions synced |
|---|---|
| Docker Hub | 5 most recent matching versions |
| All other sources | 30 most recent matching versions |
Set up automatic subscription
-
Log on to the Container Registry console.
-
In the top menu bar, select a region. In the navigation pane, choose Instances.
-
On the Instances page, click the target Enterprise instance. In the navigation pane, choose Repository > Artifact Subscription.
-
On the Artifact Subscription page, click Create Subscription Rule. In the dialog box, configure the source settings and click Next.
Parameter Description Artifact Source The external registry to sync from. Source Repository Domain Name The domain name of the custom registry. Displayed only when Artifact Source is set to Custom Source. Example: anolis-registry.cn-zhangjiakou.cr.aliyuncs.comSource Repository Location The path to the source image repository, in <namespace>/<repository>format. Example:library/nginxSubscription Policy > Image Versions To Subscribe To (Required) A regular expression to match image versions in the source repository. Default: .*(matches all versions).Subscription Policy > Subscribe to the first N images in the source repository (Required) The number of most recent matching versions to sync. Maximum: 5 for Docker Hub, 30 for other sources. OS/Architecture Filters synced images by operating system and architecture. Applies only to multi-architecture images. -
On the Image Repository page, configure the destination settings and click Create Subscription Rule.
Parameter Description Repositories The destination image repository where synced images are stored. Overwrite Image Whether to overwrite an existing image with the same name in the destination repository. Acceleration Link Improves sync speed through scheduling policies and network link optimization. Update Method The schedule for periodically syncing image tags from the source to the destination repository.
The subscription rule is now active. The instance syncs matching images automatically based on the schedule. To use an image before the next scheduled sync, see Run an immediate sync.
Run an immediate sync
Trigger a subscription rule to sync images on demand without waiting for the next scheduled run.
-
Log on to the Container Registry console.
-
In the top menu bar, select a region. In the navigation pane, choose Instances.
-
On the Instances page, click the target Enterprise instance. In the navigation pane, choose Repository Management > Artifact Subscription.
-
On the Artifact Subscription page, find the subscription rule and click Execute Now in the Actions column.
-
In the Notice dialog box, click OK.
After the sync completes, you can view the synced images in the destination image repository.