logo
8
4
Login
feat: 增加 tcr 镜像服务的使用说明

Docker Build and Publish to TCR Container Image Service

badge badge badge

Introduction

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. alt text After creation, you will see detailed information about this image repository, including commands for pushing to the repository, which contain the username and password. alt text

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.

Usage

docker pull aa.tencentcloudcr.com/xxx/test-cnb:latest docker run aa.tencentcloudcr.com/xxx/test-cnb:latest