See: https://medium.com/@Joachim8675309/jenkins-environment-using-docker-6a12603ebf9
mkdir jenkins && cd jenkins/
vim docker-compose.yml
version: "2"
services:
jenkins:
image: jenkinsci/blueocean
user: root
ports:
- "8080:8080"
- "8443:8443"
- "50000:50000"
volumes:
- ./jenkins_data:/var/jenkins_home
##### Mac OS X and Linux ONLY #####
- /var/run/docker.sock:/var/run/docker.sock
docker-compose up -d
Take note of the auto-generated admin password which is displayed during install.
This is just an example of said output:
jenkins_1 | Jenkins initial setup is required. An admin user has been created and a password generated.
jenkins_1 | Please use the following password to proceed to installation:
jenkins_1 |
jenkins_1 | 8b4d313f85674544b695394c40e1be43