搭建jenkins需要jdk支持
1.安装jdk
安装jdk参考Linux在线安装配置jdk: https://www.cnblogs.com/sheepboy/p/17197497.html
2.安装jenkins
a.搜索jenkins镜像: docker search jenkins
b.下载jenkins:docker pull jenkins/jenkins
c.使用镜像创建容器并运行:
docker run -d -u root -p 9095:8080 --name jenkins -v /home/jenkins_home:/var/jenkins_home -v /etc/localtime:/etc/localtime jenkins/jenkins
d.查看jenkins容器是否已启动: docker ps | grep jenkins
e.查看jenkins容器日志: docker logs -f jenkins
f.查看jenkins的初始花密码:docker exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword
g.使用初始化密码登录jenkins
3.jenkins用户密码修改
4.jenkins中文插件安装
Manage Jenkins>Manage plugins>Available plugins>在右侧搜索框输入:Loca , 搜索安装所有的Loca关键字插件,安装完后重启jenkins : docker restart jenkins
标签:容器,jdk,jenkins,home,docker,安装,搭建 From: https://www.cnblogs.com/sheepboy/p/17199069.html