First, create an image repository in Tencent Cloud Container Image Service, or you can use an existing one. Let's assume our instance is aa, namespace is xxx, and the name is test-cnb.
After creation, you will see detailed information about this image repository, including commands for pushing to the repository, which contain the username and password.

You can configure the pipeline like this:
main:
push:
- services:
- docker
stages:
- name: docker login
script: docker login aa.tencentcloudcr.com --username <YourUserName> --password <YourPassword>
- name: docker build
script: docker build -t aa.tencentcloudcr.com/xxx/test-cnb:latest .
- name: docker push
script: docker push aa.tencentcloudcr.com/xxx/test-cnb:latest
Note: The repository password is generally sensitive data. It is recommended to use the Secret Repository to store it.
docker pull aa.tencentcloudcr.com/xxx/test-cnb:latest docker run aa.tencentcloudcr.com/xxx/test-cnb:latest