Docker安装Jenkins(12)

通过下面的步骤就会装上jenkins

#拉镜像
docker pull jenkins
#创建挂载目录
mkdir /home/songlj/jenkins
cd /home/songlj
ls -nd jenkins/
#修改uid
chown -R 1000:1000 jenkins/
#启动jenkins
docker run -itd -p 8080:8080 -p 50000:50000 --name jenkins --privileged=true  -v /home/songlj/jenkins:/var/jenkins_home jenkins
docker ps
#浏览器http://ip:8080/jenkins     看密码
cat /home/songlj/jenkins/secrets/initialAdminPassword 

Docker安装Jenkins(12)_第1张图片
image.png

你可能感兴趣的:(Docker安装Jenkins(12))