Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/trion-development/docker-jenkins-docker-client
Jenkins Docker Image including the docker cli
https://github.com/trion-development/docker-jenkins-docker-client
Last synced: about 1 month ago
JSON representation
Jenkins Docker Image including the docker cli
- Host: GitHub
- URL: https://github.com/trion-development/docker-jenkins-docker-client
- Owner: trion-development
- Created: 2017-07-26T20:06:26.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-05-05T21:41:02.000Z (8 months ago)
- Last Synced: 2024-05-05T22:32:28.428Z (8 months ago)
- Language: Dockerfile
- Size: 19.5 KB
- Stars: 12
- Watchers: 5
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Jenkins Docker Image including the docker client
This docker image includes the docker command to enable Jenkins to interact with a docker daemon.It includes a build of docker-compose working on alpine as well.
GitHub Repository: https://github.com/trion-development/docker-jenkins-docker-client
## Docker Socket integration
If a bind-mount of the docker daemon socket is detected, appropriate permissions will be set to allow jenkins to access docker via the socket.
In order for this to work the container must be run as `root`.
To configure the uid to switch to, the environment variable JENKINS_USER must be used instead `docker -u`Example usage: Make sure the directory `$HOME/.jenkins` exists, then run
```
docker run -it --name=jenkins -e JENKINS_USER=$(id -u) --rm -p 8080:8080 -p 50000:50000 \
-v $HOME/.jenkins:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock \
--name jenkins trion/jenkins-docker-client
```## Configuration as code
When setting `JENKINS_CAC=true` the container does not start the initial Jenkins Setup Wizard.
Instead the ```Configuration as Code``` plugin is pre-installed and an initial location and admin credentials can be set using environment variables.To provide your initial configuration, you can mount it to `/provisioning/config.yaml`
Plugins to be installed can be added to a textfile and mounted to `/provisioning/plugins.txt`.
The following plugins should be provided```
authorize-project:latest
configuration-as-code:latest
role-strategy:latest
```More details: https://plugins.jenkins.io/configuration-as-code/
Afterwards, the server can be managed as usual.
```
docker run -it --name=jenkins -e JENKINS_USER=$(id -u) --rm -p 8080:8080 -p 50000:50000 \
--env JENKINS_ADMIN_ID=username --env JENKINS_ADMIN_PASSWORD=password --env JENKINS_LOCATION=http://localhost:8080 \
-v $HOME/.jenkins:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock \
--name jenkins trion/jenkins-docker-client
```