How to run Jenkins in Docker Container
Let's understand the Jenkins first
Pull the Jenkins Image
docker pull jenkins/jenkins
Using default tag: latest
latest: Pulling from jenkins/jenkins
ffacddc51d82: Pull complete
781188a9e523: Pull complete
69a15122fa9e: Pull complete
1ab7a0b3a992: Pull complete
990ebae0b67d: Pull complete
dabca586d152: Pull complete
f2d0d9a7d002: Pull complete
4ac45f07946b: Pull complete
afa4a0ea0cf8: Pull complete
a20c227120b1: Pull complete
5ed87337d302: Pull complete
a64886bb3f9f: Pull complete
52920e8e3e8d: Pull complete
2639292b661e: Pull complete
c001f3ea6952: Pull complete
bb7385fc1236: Pull complete
1b9f514ccf6a: Pull complete
Digest: sha256:76d67d16e06cf63c670405b0f08dcbbbc434ca49b4a5bc9a043b51d6c2b4d285
Status: Downloaded newer image for jenkins/jenkins:latest
docker.io/jenkins/jenkins:latest
Run the image using below command
docker run -p 8080:8080 -p 50000:50000 jenkins
*************************************************************
*************************************************************
*************************************************************
Jenkins initial setup is required. An admin user has been created and a password generated.
Please use the following password to proceed to installation:
4772035c16234e769eaa7bcf4278
This may also be found at: /var/jenkins_home/secrets/initialAdminPassword
*************************************************************
*************************************************************
*************************************************************
2021-09-27 18:51:46.657+0000 [id=29] INFO jenkins.InitReactorRunner$1#onAttained: Completed initialization
2021-09-27 18:51:46.666+0000 [id=23] INFO hudson.WebAppMain$3#run: Jenkins is fully up and running
2021-09-27 18:51:59.156+0000 [id=49] INFO h.m.DownloadService$Downloadable#load: Obtained the updated data file for hudson.tasks.Maven.MavenInstaller
2021-09-27 18:51:59.157+0000 [id=49] INFO hudson.util.Retrier#start: Performed the action check updates server successfully at the attempt #1
2021-09-27 18:51:59.161+0000 [id=49] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Finished Download metadata. 58,870 ms
Once everything is done you'll se below home screen for Jenkins
Started by user Pankaj D Running as SYSTEM Building in workspace /var/jenkins_home/workspace/simple project [simple project] $ /bin/sh -xe /tmp/jenkins86668692502344527.sh + echo Hello Jenkins Hello Jenkins + pwd /var/jenkins_home/workspace/simple project + whoami jenkins Finished: SUCCESS
No comments:
Post a Comment