Introduction to Jenkins -Install Jenkins

image source: jenkins.io
$ sudo yum install -y yum-utils \
device-mapper-persistent-data \
lvm2
$ sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
$ sudo yum -y install docker-ce docker-ce-cli containerd.io

$ sudo systemctl start docker
$ sudo systemctl enable docker
$ sudo systemctl status docker

$ usermod -aG docker nanox

$ 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$ chmod +x /usr/local/bin/docker-compose
$ docker-compose -v
$ docker pull jenkins/jenkins$ docker info | grep -i root
Docker Root Dir: /var/lib/docker
$ du -sh /var/lib/docker
586M /var/lib/docker
$ mkdir jenkins-data
$ mkdir jenkins_home
$ cd jenkins-data
$ vi docker-compose.yml
version: '3'
services:
jenkins:
container_name: jenkins
image: jenkins/jenkins
ports:
— "8080:8080"
volumes:
— $PWD/jenkins_home:/var/jenkins_home
networks:
— net
networks:
net:
$ 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
$ docker logs -f jenkinssave password ->
1c94a093462e46cab76f33exxxx

--

--

--

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

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Hakim

Hakim

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

More from Medium

CICD with Jenkins Pipelines Running in Docker

Azure DevOps with Dockerized Jenkins, NGINX Proxy Manager and Cloudflare Part #1…

Hello World from Docker