Pure.Krome
Pure.Krome

Reputation: 86947

How to Tag a Docker Image in Azure DevOps?

I'm trying to dynamically tag my docker images that I'm building in Azure DevOps using docker-compose. I'm not sure how to set the tags?

Notice how I'm trying to set the Tag as a variable .. and then in the variable .. trying to join some constant string + build number...

-> 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

Upvotes: 2

Views: 2897

Answers (1)

4c74356b41
4c74356b41

Reputation: 72171

it should be: $(dockerCompose.imageTag), unless you have some other errors, which you dont share.

Upvotes: 1

Related Questions