Container Registry allows you to directly import images from a Personal Edition instance to an Enterprise Edition instance. This topic describes how to import images from a Container Registry Personal Edition instance to a Container Registry Enterprise Edition instance.

Prerequisites

The Personal Edition instance and the Enterprise Edition instance are deployed in the same region.

Usage notes

  • You can import images from a Personal Edition instance to an Enterprise Edition instance only when both instances are deployed in the same region. If you want to import images across regions, you need to .
  • The system automatically creates a service-linked role named AliyunServiceRoleForContainerRegistryConnectCustomerVPC when you import images in Alibaba Cloud public cloud. This role enables Container Registry to transfer image data through your virtual private cloud (VPC), which accelerates the import process.
    Note For more information about AliyunServiceRoleForContainerRegistryConnectCustomerVPC, see Service-linked role for VPC access.
  • After you import images from your Personal Edition instance to your Enterprise Edition instance, you must use the domain name of the Enterprise Edition instance to access the instance. You will not be able to access the instance through the domain name of the Personal Edition instance.

Import details

  • You can still use your Enterprise Edition and Personal Edition instances during the import process.
  • You can import all information about namespaces and repositories, including the namespace name, whether repositories can be automatically created in the namespace, the default repository type, the repository name, and the repository type.
  • You can import a specified number of latest uploaded images in each repository from the Personal Edition instance to the Enterprise Edition instance. You can use regular expressions to filter the images that you want to import.
  • You can import image build configurations, including build rules and information about the source code that is bound to the repositories. You cannot import build records.

Step 1: Bind a VPC

Skip this step if you have already bound a VPC to your Container Registry Enterprise Edition instance. Skip this step if you use Alibaba Finance Cloud or Alibaba Gov Cloud.

  1. Create a VPC and a vSwitch in the region where your Container Registry Enterprise Edition instance is deployed. For more information, see Create and manage a VPC and Work with vSwitches.
  2. Log on to the Container Registry console.
  3. In the top navigation bar, select a region.
  4. In the left-side navigation pane, click Instances.
  5. On the Instances page, click the required Container Registry Enterprise Edition instance.
  6. On the management page of the Container Registry Enterprise Edition instance, choose Repository > Access Control in the left-side navigation pane.
  7. On the VPC tab, click Add VPC.
  8. In the Add VPC dialog box, select a VPC and a vSwitch, and click Confirm.
    The VPC is added. Wait until the status of the VPC changes from Creating to Running.

(Optional) Step 2: Bind a source code hosting platform

Bind the Enterprise Edition instance to the source code hosting platform that is already bound to the Personal Edition instance. For more information, see Bind a source code hosting platform. Skip this step if you do not need to migrate image build configurations.

Step 3: Create an import rule

  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 instance, choose Instances > Image Import in the left-side navigation pane.
  6. On the Image Import page, set the import parameters and then click Confirm.
    Parameter Description
    VPC To import images from a Personal Edition instance to an Enterprise Edition instance, you must use VPCs to accelerate the import process. If a VPC is added, Bound is displayed on the right side of the VPC. If no VPC is added, Unbound is displayed on the right side of the VPC.
    Source The type of the source from which images are imported. You can import images from Object Storage Service (OSS) buckets or Container Registry Personal Edition instances. In this example, Personal Edition is selected.
    Namespace The namespace from which you want to import images.
    Select Images Specifies the method to select the images that you want to import.
    1. You can specify the number of latest images that you want to import from each repository. Valid values: 0 to 100. A value of 0 indicates that no images are imported.
    2. You can specify a regular expression to filter a specified number of latest images. By default, all of the latest images are imported. A value of release-v* indicates that only images whose tag names contain the prefix release-v are imported.
    Overwrite Image Specify whether to overwrite the existing image in the Enterprise Edition instance that has the same tag as the image of the Personal Edition instance but has different digest information. By default, the existing image is overwritten.
  7. In the Import Rules section, click Trigger Task.
  8. In the Tips dialog box that appears, click OK.
    If the Results column shows Success, images are successfully imported from the Personal Edition instance to the Enterprise Edition instance.
    Note If the Results column shows The verification failed, the import task failed. You can hover over The verification failed to check the cause of failure.

Related operations

  • View import task details

    On the Image Import page, select the import task that you want to manage and click Details in the Actions column. On the import task details page, you can view the total amount of imported data (GB), the current transmission speed (MB/s), the total number of images, the number of images imported from each repository, the number of images that are successfully imported, the number of images that failed to be imported, and the cause of failure.

  • Update an import rule

    On the Image Import page, click Update Rule in the Import Rules section. In the Update Import Rule dialog box, modify the rule and click Confirm. Click Import Again. In the Tips dialog box that appears, click OK to import images based on the updated rule.