Sunday, September 27, 2020

How To Run Jenkins on Docker container On Ubuntu 20.04

 Video Tutorial -

 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Jenkins is an open source automation tool written in Java with plugins built for Continuous Integration purpose.
Offcial Website -https://www.jenkins.io/

Docker is an open source platform for building, deploying, and managing containerized applications.
Docker website - https://www.docker.com/
Docker container is a virtualized run-time environment where users can isolate applications from the underlying system.
jenkins Dockerhub Link -https://hub.docker.com/_/jenkins/
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Testing Environment: Ubuntu 20.04 LTS        Hostname - www.yourdomain.com         ip Address - 192.168.1.10
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
apt update ; apt install -y build-essential net-tools curl git software-properties-common neofetch apt-transport-https ca-certificates curl gnupg-agent docker.io docker-compose
systemctl enable --now docker ; usermod -aG docker $USER ; newgrp docker

docker pull jenkins/jenkins
docker run -p 8080:8080 --name=jenkins-master jenkins/jenkins
http://192.168.1.10:8080

Container-id -docker ps -aq                         
Stop Container - docker stop Container-id               
Start Container - docker start Container-id
Check Container logs- docker logs Container-id
Delete a Docker Image -docker rmi Container-id

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

No comments:

Post a Comment