Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker Jenkins images login error

Tags:

docker

jenkins

I'm new to docker, i trying to use jenkins on docker. So I pull jenkins image with this command

docker pull jenkins

Jenkins installed without any error. After that i started jenkins image like the document said. https://hub.docker.com/r/_/jenkins/

docker run -p 8080:8080 -p 50000:50000 -v /your/home:/var/jenkins_home jenkins

So I tried to login http://localhost:8080/ but I got login error. And its said go to https://wiki.jenkins-ci.org/display/JENKINS/Logging for check. I checked and I need to open /var/log/jenkins/jenkins.log file to generated admin password. I tried to reach that filed with bash. I didn't get the file.

How can I reach the file ? How to reach my generated password or jenkins files on docker etc.

Thank you.

like image 669
orhun.begendi Avatar asked Apr 02 '17 10:04

orhun.begendi


Video Answer


1 Answers

The password was saved to /var/jenkins_home/secrets/initialAdminPassword.
You can use

docker exec <container> cat /var/jenkins_home/secrets/initialAdminPassword

where <container> is your container id or name.

like image 75
Julian Avatar answered Sep 28 '22 10:09

Julian