DEV Community

Discussion on: Install Jenkins using Docker Compose

Collapse
 
ks profile image
ks • Edited

Great article, thank you for sharing.

I tried to set-up Jenkins using docker-compose you provided, and it works but I am unable to use docker commands inside my pipeline, instead receiving error:

docker build -t 547caf1aa35d1cb405cd7c5f91ce564aca862ad8 -f Dockerfile .

/var/jenkins_home/workspace/name@tmp/durable-7666a900/script.sh: 1: /var/jenkins_home/workspace/name@tmp/durable-7666a900/script.sh: docker: Permission denied

I checked again and I have all 3 volumes set correctly.
Any idea what might be the issue?

Collapse
 
ks profile image
ks

I managed to solve this by changing one of the volumes to:

 - /usr/bin/docker:/usr/bin/docker
Collapse
 
mojtabad profile image
Mojtaba Darvishi

Thanks, this helped me