https://github.com/mborne/docker-jenkins
[DEV] Docker image based on jenkins/jenkins:lts with docker CLI on master node.
https://github.com/mborne/docker-jenkins
dind docker docker-compose jenkins
Last synced: about 2 months ago
JSON representation
[DEV] Docker image based on jenkins/jenkins:lts with docker CLI on master node.
- Host: GitHub
- URL: https://github.com/mborne/docker-jenkins
- Owner: mborne
- License: mit
- Created: 2020-05-21T14:27:08.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-23T00:24:27.000Z (over 3 years ago)
- Last Synced: 2025-04-14T23:03:27.129Z (about 1 year ago)
- Topics: dind, docker, docker-compose, jenkins
- Language: Dockerfile
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docker-jenkins
Docker image based on [jenkins/jenkins:lts](https://hub.docker.com/r/jenkins/jenkins) with docker CLI on master node.
## Usage
* Start jenkins : `docker-compose up -d`
* Retrieve initial password : `docker exec -ti jenkins cat /var/jenkins_home/secrets/initialAdminPassword`
* Open https://jenkins.dev.localhost
## Jenkins environment
You may add the following environment variables to write portable Jenkinsfile :
| Variable | Description | Example |
| ----------------------------- | ------------------------------------------------------------ | ----------------------------------- |
| DOCKER_REGISTRY | Hostname for docker registry | `registry.${HOST_HOSTNAME}` |
| DOCKER_REGISTRY_URL | URL for docker registry | `https://registry.${HOST_HOSTNAME}` |
| DOCKER_REGISTRY_CREDENTIAL_ID | Jenkins credential id to access registry (username/password) | `nexus_user` |
## Notes
* This approach could not be the best one for production purpose. See [~jpetazzo/Using Docker-in-Docker for your CI or testing environment? Think twice.](https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/)
* Jenkins is added to docker group at runtime if `unix:///var/run/docker.sock` is mounted (**deprecated**)
## See also
* [www.jenkins.io - Installing Jenkins - docker](https://www.jenkins.io/doc/book/installing/docker/)
* [www.jenkins.io - Using Docker with Pipeline](https://www.jenkins.io/doc/book/pipeline/docker/)
## License
[MIT](LICENSE)