Docker Jenkins映像登录错误 [英] Docker Jenkins images login error
问题描述
我是docker的新手,我想在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已安装,没有任何错误.之后,我开始像文档所说的那样开始詹金斯形象. https://hub.docker.com/r/_/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
所以我尝试登录http://localhost:8080/
,但是出现登录错误.它说到 https://wiki.jenkins-ci.org/display/JENKINS/正在记录进行检查.我检查了一下,我需要打开/var/log/jenkins/jenkins.log
文件来生成管理员密码.
我试图通过bash
达到要求.我没有得到文件.
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.
如何获取文件?如何在docker等上访问我生成的密码或jenkins文件.
How can I reach the file ? How to reach my generated password or jenkins files on docker etc.
谢谢.
推荐答案
密码已保存到/var/jenkins_home/secrets/initialAdminPassword
.
您可以使用
The password was saved to /var/jenkins_home/secrets/initialAdminPassword
.
You can use
docker exec <container> cat /var/jenkins_home/secrets/initialAdminPassword
其中<container>
是您的容器ID或名称.
where <container>
is your container id or name.
这篇关于Docker Jenkins映像登录错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!