All Products
Search
Document Center

Container Registry:Create a public image repository and share it in the Image Hub

Last Updated:Jan 04, 2024

You can create public image repositories in Container Registry and push images to the repositories to share the images with others. This helps you implement resource sharing and collaborative development of images.

Prerequisites

A Container Registry Personal Edition instance is created. For more information, see Create a Container Registry Personal Edition instance.

Step 1: Create a public image repository

  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 Personal Edition instance that you want to manage.

  5. In the left-side navigation pane of the management page of the Personal Edition instance, choose Repository > Repositories.

  6. On the Repositories page, click Create Repository.

  7. In the Repository Info step of the Create Repository wizard, configure Namespace, Repository Name, and Summary. Then, set Repository Type to Public and click Next.

  8. In the Code Source step, configure Code Source and click Create Repository.

    Parameter

    Description

    Code Source

    Select a code source. Valid values: Codeup, GitHub, Bitbucket, Private GitLab, or Local Repository.

    Note

    If you select Codeup, GitHub, Bitbucket, or Private GitLab as the code source, you must bind your Container Registry instance to a code source repository. For more information, see Step 1: Bind a source code repository.

    Build Settings

    If you select Codeup, GitHub, Bitbucket, or Private GitLab as the code source, you must configure Build Settings.

    • Automatically Build Images When Code Changes: The building rule is automatically triggered when code is committed from a branch.

    • Build with Servers Deployed Outside Chinese Mainland: Images are built in a data center outside the Chinese mainland and then pushed to an image repository in the specified region.

    • Build Without Cache: The system pulls the base image from the source code repository each time an image is built. This may increase the time required for building the image. You can disable Build Without Cache to accelerate the building process.

Step 2: Configure an image

You can push images to the public image repository that you created. For more information, see Use a Container Registry Personal Edition instance to push and pull images. You can also build images in the public image repository. For more information, see Create a repository and build images.