【问题标题】:How to Tag a Docker Image in Azure DevOps?如何在 Azure DevOps 中标记 Docker 映像?
【发布时间】:2018-12-01 13:16:10
【问题描述】:

我正在尝试使用 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

【问题讨论】:

    标签: docker docker-compose azure-devops


    【解决方案1】:

    应该是:$(dockerCompose.imageTag),除非你有其他错误,你不会分享。

    【讨论】:

      猜你喜欢
      • 2021-02-22
      • 2023-03-10
      • 1970-01-01
      • 2021-06-02
      • 1970-01-01
      • 2020-06-27
      • 1970-01-01
      • 1970-01-01
      • 2021-07-20
      相关资源
      最近更新 更多