英文:
In Azure pipeline - how to build docker image with multiple image tags
问题
- 任务: Docker@2
输入:
容器注册表: '我的注册表'
仓库: '$(System.TeamProject)/$(Build.Repository.Name)'
命令: 'buildAndPush'
Dockerfile: 'Dockerfile'
标签: |
$(Build.SourceVersion)
$(Build.SourceBranchName)
是否可以为一个镜像构建添加多个标签?
在 Azure 流水线中为一个 Docker 构建添加多个镜像标签
英文:
- task: Docker@2
inputs:
containerRegistry: 'my-registry'
repository: '$(System.TeamProject)/$(Build.Repository.Name)'
command: 'buildAndPush'
Dockerfile: 'Dockerfile'
tags: |
$(Build.SourceVersion)
$(Build.SourceBranchName)
is it possible to do multiple tags for one image build?
Need to add multiple image tag for one docker build in azure pipelines
答案1
得分: 1
你的问题包含了答案:
标签: |
$(Build.SourceVersion)
$(Build.SourceBranchName)
更多标签在此处添加
英文:
your question contains the answer:
tags: |
$(Build.SourceVersion)
$(Build.SourceBranchName)
more_tags_go_here
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论