Docker Jenkins Setup
Docker Jenkins Setup
Jenkins is an automation server. While you can use it to automate just about
any task, it’s most often associated with building source code and deploying
the results. For many, Jenkins is synonymous with continuous integration and
continuous delivery (CI/CD).
Docker Compose :
● Sometimes you need to run more than one container, but you don’t want
or need the complexity of Kubernetes.
● Docker Compose lets you configure related containers in a single YAML
file.
● They come in a simpler system that’s more suited to smaller applications
that don’t need Kubernetes’ resiliency and scaling.
Docker Based Jenkins Setup
● Create directory docker-jenkins
● Contents of docker-compose.yml
Jenkins Look|Feel
Jenkins
Docker Based Jenkins Setup
● Install docker-compose
● sudo apt install docker-compose
● Create docker-compose.yml and paste the
content from resources file
● Run docker-compose using below cmd
● docker-compose up -d
● As we go further within few mins we will get
the password instructions from UI
Jenkins initial password
Docker Based Jenkins Setup
● This will run jenkins latest image with root
privileges
● 50000 port is used for communication
between Jenkins master and agent
● 8080 port to map jenkins container running
to host 80 port.
● host path i.e
/home/jenkins/docker-jenkins/jenkins_data
is mapped to /var/jenkins_home path in the
container