Installation of Jenkins on Docker

Installation of Jenkins on Docker

Create a separate directory for the project, and configure the Docker compose file:

Compose file in VS CODE:

Save in Vim docker-compose.yml file

Pull image from Docker Hub: weekly release:

https://hub.docker.com/r/jenkinsci/jenkins/

-->Important::Also, you may use the following docker hub image for your container: simply replace the image with Jenkins:Jenkins

Create a volume directory (jenkins_vol) in the same folder (docker_projects): give full access to the jenkins_vol directory:

root@ip-172-31-27-212:/home/ubuntu/docker# chmod 777 jenkins_vol/

setup Jenkins using the following command:

>>docker-compose up -d

Docker Installation verification:

>>root@ip-172-31-27-212:/home/ubuntu/docker_projects# docker images

>>root@ip-172-31-27-212:/home/ubuntu/docker_projects# docker ps

root@ip-172-31-27-212:/home/ubuntu/docker_projects# systemctl status docker

Jenkins login password:

root@ip-172-31-27-212:/home/ubuntu/docker_projects# docker logs b4055cf1fc3e

Jenkins Installation on Docker Container:

ALL DONE>>>

\===================================

Have a Great Weekend!!