https://github.com/suyashkumar/jenkins-ssl-docker
Jenkins container with SSL and docker
https://github.com/suyashkumar/jenkins-ssl-docker
Last synced: about 1 year ago
JSON representation
Jenkins container with SSL and docker
- Host: GitHub
- URL: https://github.com/suyashkumar/jenkins-ssl-docker
- Owner: suyashkumar
- Created: 2018-01-29T00:07:10.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-12T16:55:42.000Z (about 8 years ago)
- Last Synced: 2025-05-08T20:58:04.546Z (about 1 year ago)
- Language: Shell
- Homepage:
- Size: 6.84 KB
- Stars: 7
- Watchers: 2
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Jenkins SSL + Docker
A Jenkins docker configuration that includes SSL out of the box as well as support for running Docker container builds **within** Jenkins. I find the latter very useful as I tend to run all of my Jenkins jobs and builds using docker containers to best handle dependency management and reproducibility. The default SSL certificates are self-signed and generated at build time, but can be overridden with your own using Docker volumes.
To run (with self-signed SSL certificates):
```sh
docker run -p 443:4430 -v jenkins_home:/var/jenkins_home suyashkumar/jenkins-ssl-docker
```
To run WITH the ability to have Jenkins build Docker containers within itself:
```sh
docker run -p 443:4430 -v jenkins_home:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock suyashkumar/jenkins-ssl-docker
```
To run with your own certificates:
```sh
docker run -p 443:4430 -v jenkins_home:/var/jenkins_home -v YOUR_PRIV_KEY_FILE:/var/lib/jenkins/pk -v YOUR_CERT:/var/lib/jenkins/cert suyashkumar/jenkins-ssl-docker
```
A sample `Jenkinsfile` you can have in your target repository to initiate a docker build based on its `Dockerfile` looks something like this:
```
pipeline {
agent { dockerfile true }
stages {
stage('Test') {
steps {
// any additional steps you may want can be here.
}
}
}
}
```