Run Jenkins in a docker container and give it socket access to build/run other docker containers. This was an experiement for a presentation I did on docker.
/var/jenkins_homeprobably needs 777 permissions
docker.sockprobably needs 777 permissions since user/groups get confused
- SSH creds can be generated by jenkins user.
- Git commands require those creds added into
credentialsand if you have scripts that use ssh then you will want to add those ssh creds to
publish over sshso that pipelines can ssh into other machines
- Keep the filepath of
jenkins_homethe same on host and in container so if you need volume mounts inside the container, they will be translated correctly onto the host machine
- Running docker with
usernswill make things more complicated with user/group translations