You need to enable JavaScript to run this app.
Container Registry

Container Registry

Copy page
Download PDF
Image migration and synchronization
Migrating images in batches by using cr-image-syncer
Copy page
Download PDF
Migrating images in batches by using cr-image-syncer
cr-image-syncer is a general image migration tool developed by CR. It supports migrating generic Docker Registry-type registries to Volcano Engine CR.​
Scenario description​
Registry migration is often required in multi-cloud and site migration scenarios. cr-image-syncer can effectively support migration of generic Docker Registry-type registries.​
Prerequisites​
  • The domain names, usernames, login keys, and other basic information of the source and destination registry instances have been obtained. For information about how to obtain the basic information of a CR instance, see Managing Standard Edition instances.​
  • Ensure network connectivity between the third-party cloud registry and Volcano Engine CR.​
tip​
  • Public network: CR currently supports one-click migration over the public network from registries of cloud vendors such as Alibaba Cloud, Tencent Cloud, AWS, Google, Harbor, and Docker to Volcano Engine CR. For more information, see Synchronizing external registries to CR.​
  • Dedicated line: Migration over dedicated lines is supported. Volcano Engine provides multiple dedicated line connectivity solutions, such as Cloud Enterprise Network. For details, contact your account manager.​
Procedure​
Step 1: Download and install the tool​
  • MAC darwin-amd64:​
  • ​
    wget https://cr-tools.tos-cn-beijing.volces.com/darwin/amd64/cr-image-syncer && chmod a+x cr-image-syncer​
    ​
  • ​
    ​
    cr-image-syncer
    ​
    ​
  • Linux:​
  • ​
    wget https://cr-tools.tos-cn-beijing.volces.com/linux/amd64/cr-image-syncer && chmod a+x cr-image-syncer​
    ​
  • ​
    ​
    cr-image-syncer
    ​
    ​
Step 2: Create namespaces in batches​
  1. Create a configuration file named config.yaml. Sample code:​
  • ​
    target:​
    type: volc​
    apiHost: cr.cn-beijing.volcengineapi.com ​
    region: cn-beijing​
    instance: customer-registry​
    accessKey: AKLTY2xxxxMDI3YzE​
    secretKey: TkRrMxxxxMFlqVQ==​
    ​
​
Configuration item​
Description​
type​
The cloud provider code. This configuration is fixed as volc.​
apiHost​
The OpenAPI endpoint. This configuration is fixed as cr.cn-beijing.volcengineapi.com.​
region​
The region of the Volcano Engine CR instance.​
instance​
The name of the Volcano Engine CR instance, not the instance ID.​
accessKey​
The key required to access Volcano Engine OpenAPI. For more information, see API Access Key Management.​
secretKey​
The key required to access Volcano Engine OpenAPI. For more information, see API Access Key Management.​
​
  1. Create a namespace configuration file named namespace.yaml. Sample code:​
  • ​
    defaultConfig:​
    repositoryDefaultAccessLevel: "Private"​
    namespaces:​
    # use default config​
    - name: "ns1"​
    - name: "ns2"​
    # rewrite repositoryDefaultAccessLevel​
    repositoryDefaultAccessLevel: "Public"​
    - name: "ns3"​
    repositoryDefaultAccessLevel: "Private"​
    - name: "ns4"​
    - name: "ns5"​
    ​
  • ​
    Configuration item​
    Description​
    repositoryDefaultAccessLevel​
    The default public/private type of artifact repositories in the namespace.​
    • Private: private OCI artifact repositories that require access keys.​
    • Public: public OCI artifact repositories that support direct access without keys.​
    name​
    The name of the namespace to be created.​
    ​
  1. Execute the batch creation command.​
  • ​
    cr-image-syncer prepare create-namespace --config config.yaml --namespaces namespace.yaml --debug​
    ​
Step 3: Batch synchronize images​
  1. Add authentication information to config.yaml. In this example, images are migrated from a third-party cloud registry to Volcano Engine CR. Fill in third-party cloud registry credentials in source and Volcano Engine CR credentials in target.​
  • ​
    source:​
    registryHost: src-registry-cn-beijing.cr.****.com​
    registryUsername: customer@****​
    registryPassword: ****​
    insecure: false​
    target:​
    registryHost: dst-registry-cn-beijing.cr.volces.com​
    registryUsername: customer@****​
    registryPassword: ****​
    insecure: false​
    ​
  • ​
    Configuration item​
    Description​
    registryHost​
    The address of the source or destination registry.​
    registryUsername/​
    registryPassword​
    The login credentials of the registry.​
    • For third-party registries, see the corresponding official documentation.​
    insecure​
    Whether HTTP login is allowed for the registry. We recommend that you enter false.​
    ​
  1. Configure the batch image synchronization file images.yaml. Sample content: If multiple lines are specified, each line must be in the format <source repo>:<destination repo>.​
  • ​
    src-regsitry-cn-beijing.cr.****.com/****/repo: dst-registry-cn-beijing.cr.volces.com/ns1/repo​
    src-regsitry-cn-beijing.cr.****.com/****/a: dst-registry-cn-beijing.cr.volces.com/ns2/a​
    src-regsitry-cn-beijing.cr.****.com/****/ubuntu: dst-registry-cn-beijing.cr.volces.com/ns2/ubuntu​
    ​
  1. Execute the batch synchronization command.​
  • ​
    # --debug add as needed​
    cr-image-syncer copy --without-prepare --config config.yaml --images images.yaml --debug​
    ​
Results​
After the operations are complete, you can view the synchronized images in the image list of the corresponding OCI artifact repositories.​
​
Last updated: 2026.10.19 15:46:48