So I want to start using Jenkins to build my app and then test it and push my image to local repo. Because I have 2 images to push I would like to use docker-compose, but docker-compose is missing.
I installed Jenkins through Portainer, and I'm using the jenkins/jenkins:lts image.
Is there a way to install docker-compose into the container without having to create my own Dockerfile for it?
My Jenkins pipeline so far is:
node {
stage('Clone repository') {
checkout([$class: 'GitSCM',
branches: [[name: '*/master' ]],
extensions: scm.extensions,
userRemoteConfigs: [[
url: 'repo-link',
credentialsId: 'credentials'
]]
])
}
stage('Build image') {
sh 'cd src/ && docker-compose build'
}
stage('Push image') {
sh 'docker-compose push'
}
}