Does Jenkins Pipeline Plug-in support Docker Compose?

luka5z picture luka5z · May 13, 2016 · Viewed 38.1k times · Source

I'm looking for a way to run Docker-enabled build consisting of multiple containers in Jenkins 2.0.

Are there any plans for native support of Docker Compose in Pipeline, or through CloudBees docker plugins for pipeline.

Or can/must this be addressed by explicit calls sh docker-compose...? Maybe even use them inside try... finally to further control services lifecycle.


EDIT: The first answer was to suggest a way to build docker containers in jenkins. This is not what is needed here. I (EngineerDollery) want to bring up my target platform in jenkins using compose so that I can deploy my app to it and run end-to-end tests.

Answer

VonC picture VonC · Aug 1, 2016

After searching in Jenkins bug tracking, JENKINS-35025 suggests docker-compose.yml is taken into account when running a job in a docker container, using a maven build.

See also Creating CI pipeline with Jenkins, which assumes docker-compose is installed on your Jenkins server.

Note: a year later (August 2017), docker-compose is still not supported in the Docker Pipeline plugin

July 2018, Ivan Aracki notes in the comments:

Manually installing docker-cli and docker-compose with the same version as host's is the solution for now...