I have pipeline code running as deploy user.
my Jenkins service is running as docker container, and my host vm is docker container, so I'm using docker in docker
I started my Jenkins with volume
/var/run/docker.sock:/var/run/docker.sock
Jenkins started as Jenkins user and also I have deploy user created and added docker group on Jenkins service
Now when I run docker commands thru my pipeline code as deploy user I can run the docker comamnds
But when I run docker-compose as deploy user it says "command not found"
I logged on Jenkins server and check those commands from command line
docker -v. works for both Jenkins and deploy user
docker-compose -v. works only for Jenkins user but not for either root or deploy users
what could be the problem
or else I have to run my pipeline with a specific user . I log into Jenkins ui as deploy user, if I want to run the pipeline as Jenkins user ,how do code that in the pipeline code?
any help would be appreciated