Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'docker-compose' not found error when command was executed in Jenkins job

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.

like image 956
user3411289 Avatar asked Mar 09 '16 12:03

user3411289


People also ask

How do I make Docker images automatically with Jenkins pipeline?

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.

What is required for Jenkins to build a Docker image?

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.


1 Answers

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

like image 199
ionyekanna Avatar answered Sep 28 '22 02:09

ionyekanna