Introduction to Jenkins -Install Jenkins

How to install jenkins on centos 7

image source: jenkins.io

install docker on centos

$ sudo yum install -y yum-utils \
device-mapper-persistent-data \
lvm2

Install Docker Compose

$ sudo curl -L "https://github.com/docker/compose/releases/download/1.25.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

Downloading the jenkins docker image

$ docker pull jenkins/jenkins

create a docker compose file for jenkins

$ mkdir jenkins-data
$ mkdir jenkins_home
$ cd jenkins-data
$ vi docker-compose.yml

Create a Docker container for jenkins

$ sudo chown 1000:1000 jenkins_home -R
$ docker-compose up -d
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
cdcd15d0b313 jenkins/jenkins “/sbin/tini — /usr/…” 21 seconds ago Up 19 seconds 0.0.0.0:8080->8080/tcp, 50000/tcp jenkins

open browser http://192.168.88.24:8080

install suggested plugins

Thanks..

Reference: https://docs.docker.com/install/linux/docker-ce/centos/

This is my little notes based my experiment and my learning. Keep learning and keep calm.

This is my little notes based my experiment and my learning. Keep learning and keep calm.