Install Jenkins on Ubuntu 18.04

https://www.digitalocean.com/community/tutorials/how-to-install-jenkins-on-ubuntu-18-04

sudo apt-get update -y && sudo apt-get upgrade -y

sudo apt update -y

sudo apt install openjdk-8-jdk -y

wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -

sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'

sudo apt update -y

sudo apt install jenkins -y

sudo systemctl start jenkins

sudo systemctl status jenkins

sudo ufw allow 8080

sudo ufw allow OpenSSH

sudo ufw enable

sudo ufw status

Install Jenkins through docker:
https://www.jenkins.io/doc/book/installing/#debian-ubuntu