Azure devOps Piepline Docker-Compose Build with Spesific Image name

Is it possible to build docker images with docker compose task in azure DevOps pipelines
and give in specific name ?

because the names i get to the images is the $(Build.Repository.Name) only .

What I Tried :

steps: 
- task: [email protected]
  inputs:
    containerregistrytype: 'Container Registry'
    dockerRegistryEndpoint: 'Docker_Hub'
    dockerComposeFile: '**/docker-compose.yml'
    qualifyImageNames: false
    action: 'Run a Docker Compose command'
    dockerComposeCommand: 'build'

and without the qualifyImageNames too .

I tried this also but i got image name xxx_{somename form the docker-compose.yaml}

- task: [email protected]
  inputs:
    containerregistrytype: 'Container Registry'
    dockerRegistryEndpoint: 'Docker_Hub'
    dockerComposeFile: '**/docker-compose.yml'
    projectName: 'xxx'
    action: 'Build services'
    includeLatestTag: true

but i want to give them image name like myreponame/somename:latest

I have 2 images the docker-compose need to build.

Source: Docker Questions

LEAVE A COMMENT