Image Registry User Guide

Last updated: 2020-02-24 18:49:54

PDF

Operation Scenarios

The image registry is used to store Docker Hub images, which are used to deploy TKE. Each image has a unique ID (image registry address + image name + image tag).

Steps

Enable Image Registry

Users who use image registry for the first time need to activate this service first.

  1. Log in to the TKE console and select Clusters In the left sidebar.
  2. According to the following prompts, Enter related information, and click [Enable] to initialize.
  • UserName : By default, this is the account of the current user. Use this account to log in to Tencent Cloud Docker Hub Image Registry.
  • Password : This is the credential to log in to Tencent Cloud Docker Hub Image Registry.

Creating a Namespace

  1. Choose [Image Registry] from Left sidebar My Images, go to the "my Image" page.
  2. On the my Image page, select the Namespace tab and click Create.
  3. In the pop-up Create Namespace window, enter the namespace name and click submit. as shown below:

The namespace name is globally unique. If the namespace name you want to use is already used by another user, try another applicable namespace name.

Creating Image

  1. Choose [Image Registry] from Left sidebar My Images, go to the "my Image" page.
  2. On the my Image page, click [Create] at the top of the Image list page.
  3. Enter the image name and description, and then click Trending .

The namespace will be used for the classification container Image, which is also a prefix to the private Image address you created. tkefiletest As an example.

Pushing Image to Image Registry

Logging in to Tencent Cloud Registry

  1. Replace the relevant information in the following command at the terminal and execute it, and log in to Tencent Cloud registry.
$ sudo docker login --username=[username] ccr.ccs.tencentyun.com

Username: Tencent Cloud account registered upon service activation.
2. Login is complete after entering the password.

Uploading Image

According to the following prompts to replace the relevant information in the command and execute, upload Image.

$ sudo docker tag [ImageId] ccr.ccs.tencentyun.com/[namespace]/[ImageName]:[Image Tag]
$ sudo docker push ccr.ccs.tencentyun.com/[namespace]/[ImageName]:[Image Tag]
  • ImageId And image tag should be entered according to the image details.
  • namespace Is the namespace you entered when activating your image registry.
  • ImageName Is the image name created on the console.

Downloading Image

  1. To log in to Image Registry by executing the following command, you need to enter in Enable Image Registry The password that has been set in the.
$ sudo docker login --username=[username] ccr.ccs.tencentyun.com
  1. Replace the relevant information in the command and execute it, download Image.
$ sudo docker pull ccr.ccs.tencentyun.com/[namespace]/[ImageName]:[Image Tag]

Deleting Image

  1. Choose [Image Registry] from Left sidebar My Images ], go to the "my Image" page.
  2. On the "my Image" page, select [Delete] to the right of the line where you want to delete Image.
  3. In the pop-up "Delete Image Registry" window, click [OK] Delete all versions of Image .