I want to run a docker-compose in my Jenkins pipeline. My docker-compose needs to the current workspace source code. Jenkins cannot mount the volumes. What is missing?
pipeline {
agent any
stages {
stage('Test') {
steps {
sh 'docker-compose run php'
}
}
}
}
#docker-compose.yml
version: '3'
services:
web:
image: nginx
volumes:
- ./src:/var/www/html
php:
image: php
volumes:
- ./src:/var/www/html