3

I would like to use Docker Compose task in Azure pipelines, but I am getting following error:

##[error]Unhandled: Docker Compose was not found. You can provide the path to docker-compose via 'dockerComposePath'

How should I install docker compose? Is there a "nice way", something like Docker Installer task?

Katebrich
  • 88
  • 7
  • Which agent are you using? – richardsefton Jun 25 '21 at 20:43
  • @richardsefton: Ubuntu 18.04 – Katebrich Jun 26 '21 at 16:58
  • 1
    You may have to supply a script to install compose on the target machine but I'm suprised that the microsoft hosted agents don't have this already. Another option would be to host your own agent that has anything you need on there without the need to use any install scripts in your pipeline. – richardsefton Jun 26 '21 at 19:41

2 Answers2

1

Unfortunately, there does not seem to be a "clean" step like Docker Installer task for Azure pipelines to install Docker Compose.

However, I have been able to get Docker Compose installed via shell script task which utilizes the local package manager to get/install Docker Compose (e.g. sudo apt-get install -y docker-compose)

- task: ShellScript@2
  displayName: Install Docker-Compose
  inputs:
    scriptPath: 'docker-compose-install.sh'
Mike Manard
  • 1,020
  • 9
  • 13
0

May be due to passage of time, but I see the following as an option:

- task: DockerCompose@0

While I had some difficulty with my particular pipeline, it did not complain about DockerCompose not being installed. I did run the

- task: DockerInstaller@0

ahead of that.

Dave
  • 136
  • 2
  • 12