Install Jenkins
apt install openjdk-11-jdk -y
java -version
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.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
sudo apt install jenkins
systemctl start jenkins
systemctl enable jenkins
systemctl status jenkins
Install docker
sudo apt update -y
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
sudo apt update -y
apt-cache policy docker-ce
sudo apt install docker-ce -y
sudo systemctl enable docker
sudo systemctl restart docker
sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
Add user Jenkins group docker
sudo usermod -a -G docker jenkins
sudo groupadd docker
sudo usermod -aG docker ${USER}

Here we need to enter the password. To obtain the password, run the following command in the terminal to locate the password that is stored in the initialAdminPassword file.
root@host:~# cat /var/lib/jenkins/secrets/initialAdminPassword
9654*******d9549b******2195******18
root@host:~#