logo
8
4
Login

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

About

构建 Docker 镜像,并发布到 TCR容器镜像服务

Language
Markdown96.1%
Dockerfile4%