- successfully installed jenkins inside docker container.
- successfully created a new freestyle project jenkins job
- linked the job with github
- from the ‘execute shell’ of jenkins tried to execute certain commands.
- commands like ls, whoami works but none of the docker, docker-compose commands work from the shell.
- I keep getting the error /tmp/jenkins5519456104283077094.sh: 4: /tmp/jenkins5519456104283077094.sh: docker: not found
or when I run docker-compose I get the error docker-compose not found
I started the docker as user jenkins. when I run the same command from my terminal (logged in as jenkins) everything works fine. Only from jenkins shell I face docker/docker-compose not found error. Can anyone help me figure out the issue please?