aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 95287a05906d720cfa9ec569ce0ba1717a8ad45f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Docker Jenkins

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.

## Lessons Learned

- `/var/jenkins_home` probably needs 777 permissions
- `docker.sock` probably needs 777 permissions since user/groups get confused
- SSH creds can be generated by jenkins user.
- Git commands require those creds added into `credentials` and if you have
  scripts that use ssh then you will want to add those ssh creds to `publish
  over ssh` so that pipelines can ssh into other machines
- Keep the filepath of `jenkins_home` the 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 `userns` will make things more complicated with user/group
  translations