安装jenkins并配置jdk,maven,git ( docker )
南江烂柯人 JAVA劝退师

前置条件先安装好docker,docker-compose,jdk,maven,git在宿主机上

拉取镜像

docker pull jenkinsci/blueocean:1.24.8

创建挂载文件目录

mkdir /home/jenkins_home

编写docker-compose.yml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
version: '3.5'
services:
jenkins:
user: root
image: jenkinsci/blueocean:1.24.8
container_name: jenkins
restart: always
ports:
- 7070:8080
- 50000:50000
#目录挂载
volumes:
#挂载jenkinshome
- /home/jenkins_home:/var/jenkins_home
#挂载maven
- /home/maven/apache-maven-3.8.2:/usr/local/maven
#挂载jkd
- /home/jdk1.8/jdk1.8.0_261:/usr/local/jdk8
#挂载git
- /usr/local/git:/usr/local/git

启动docker-compose

docker-compose up -d 

打开jenkins安装相关插件

git, maven
  • 本文标题:安装jenkins并配置jdk,maven,git ( docker )
  • 本文作者:南江烂柯人
  • 创建时间:2019-09-01 09:47:12
  • 本文链接:https://www.mattjia.com/2019/09/01/installation/安装jenkins并配置jdk,maven,git ( docker版本 )/
  • 版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
 评论