I'm trying to configure CI with Jenkins for my private project. Problem:
- whenever I start building a pipeline project, it gives me ,,Docker is not found'' error
- whenever I try to work around this by installing npm plugin and running bash script
npm installas a build step, I get node/npm not found
Solutions I've found and tried:
According to official Jenkins docker image docs, all one is supposed to do is to mount docker.socket in dockerfile/docker-compose file and it should ,,just'' work (it doesn't) - example:
volumes: - /var/run/docker.sock:/var/run/docker.sock
The only solution that was close to working as intended, was to install docker directly on Jenkins container and then setting user for jenkins. It works, but only until docker image is running. When I kill it and run it again, docker isn't installed on container and so every pipeline fails again. I can't have that, I cannot have a downtime caused by say remote server being down. I'd have to manually install docker on that Jenkins container every time something was down.