Before You Begin
• The Enterprise Edition instance has been activated.
• Docker has been installed
Acquiring the Instance Login Command
1. Access the Cloud Container Repository console.
2. Click the name of the activated instance.
3. In the left navigation pane, select Instance Management - Access Credentials to go to the Access Credentials page.
4. On this page, you can find the command to log into the instance.
5. The login username and password are the ones you provided when activating the Enterprise Edition instance. If you have forgotten your password, you can reset it by clicking the Reset Password button on the page.
Create Namespace
1. Access the Cloud Container Repository console.
2. Click the name of the activated instance.
3. In the left navigation pane, select Container Image – Namespace.
4. Click the Create Namespace button on the page.
5. Fill in the name of the namespace, then click Create.
Create Image Repository
1. Access the Cloud Container Repository console.
2. Click the name of the activated instance.
3. In the left navigation pane, select Container Image – Image Repository.
4. Click the Create Repository button.
5. Choose the associated namespace of the image repository, fill in the name of the image repository, and click Create.
Logging into the Image Repository Instance
1. Enter the environment with Docker installed. Execute the Log in to Instance command on the Instance Management - Access Credentials page (input the password as prompted). For example
sudo docker login --username=crs-test crs-test-registry-ctyunnm8.crs.ctyun.cn
2. If you see a message indicating "Login succeeded", then you have successfully logged in
Push Image
1. Prepare the Image: Build the image using methods such as docker build
2. Execute the docker tag command
docker tag <image ID> <image instance address>/<namespace>/<image repository name>:<image edition number>
Example
docker tag my-image:v1 crs-test-registry-ctyunnm8.crs.ctyun.cn/my-ns/my-image:v1
3. Execute the docker push command
docker push <image instance address>/<namespace name>/<image repository name>:<image edition number>
Example
docker push crs-test-registry-ctyunnm8.crs.ctyun.cn/my-ns/my-image:v1
Pull Image
1. Ensure that an image already exists in the image repository. If the image is private, you need to log in first.
2. Execute the docker pull command
docker pull <image instance address>/<namespace name>/<image repository name>:<image edition number>
Example
docker pull crs-test-registry-ctyunnm8.crs.ctyun.cn/my-ns/my-image:v1