如何在Azure DevOps中标记Docker映像?

时间:2018-12-01 13:16:10

标签: docker docker-compose azure-devops

我正在尝试使用docker-compose动态标记在Azure DevOps中构建的docker映像。我不确定如何设置标签?

注意我如何尝试将标签设置为variable ..然后在变量..中尝试连接一些常量字符串+内部版本号...

-> additionalImageTags: '${dockerCompose.imageTag}'

resources:
- repo: self
queue:
  name: Hosted Ubuntu 1604
steps:
- task: DockerCompose@0
  displayName: 'Build and Tag Images'
  inputs:
    azureSubscription: '<snipped>'

    azureContainerRegistry: '<snipped>'

    dockerComposeFile: 'docker-compose.yml'

    additionalDockerComposeFiles: 'docker-compose.override.yml'

    qualifyImageNames: false

    action: 'Build services'

    additionalImageTags: '${dockerCompose.imageTag}'

    includeLatestTag: true

enter image description here

1 个答案:

答案 0 :(得分:1)

它应该是:$(dockerCompose.imageTag),除非您有其他不共享的错误。