I need to build a docker image using docker-compose.yaml file and then I need to push it on dockerhub. I used following command to build Dockerfile and push it to dockerhub with jenkins docker plugin.
stage('Building image and Push') {
steps{
script {
customImage = docker.build("my-image:${env.BUILD_ID}")
customImage.push()
}
}
}
Is there a similar method to write this kind of command to build and push docker-compose file?
PS: I heard about about a plugin called Docker compose build step. Can I do same as above with this plugin?