When i'm trying to execute docker-compose up
as a shell build step command in Jenkins job, i got response docker-compose: command not found
.
Does anyone have an idea how to fix this?
Itself Jenkins is hosted on CentOS machine.
I've already added user 'jenkins' to 'sudoers' and to user groups: root, jenkins, docker.
Setting up your environmentInstall the Docker Pipelines plugin on Jenkins: Manage Jenkins → Manage Plugins. Search Docker Pipelines, click on Install without restart and wait until is done. Upload your Dockerfile definition to your Github repository.
In the case of Jenkins, this means the Docker image contains the files you require to support a minimal Linux operating system, along with the version of Java required to run Jenkins. A container is an isolated environment in the OS where the Docker image is executed.
This was the command that i was missing
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
I executed that and jenkins was fine
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With