Docker 部署 Jenkins (一)

Docker 部署 Jenkins (一)

一. 安装 jenkins

$ mkdir -p /home/tester/data/docker/jenkins
$ vim jenkins:lts-jdk11.sh

./jenkins:lts-jdk11.sh 内容

#! /bin/bash
mkdir -p /home/tester/data/docker/jenkins/jenkins_home

sudo chown -R 1000:1000 /home/tester/data/docker/jenkins/jenkins_home

docker rm -f jenkins/jenkins:lts-jdk11

docker run -d \
-v /home/tester/data/docker/jenkins/jenkins_home:/var/jenkins_home \
-p 8080:8080 \
-p 50000:50000 \
--restart=on-failure \
jenkins/jenkins:lts-jdk11
$ ./jenkins2.60.3.sh 
Status: Downloaded newer image for jenkins/jenkins:lts-jdk11
37259c708ca1c9e172112864412c187e84449b6d9c1f659ffb0e13c3894fb6aa
$ docker ps
CONTAINER ID   IMAGE               COMMAND                  CREATED         STATUS                   PORTS                                                                                      NAMES
37259c708ca1   jenkins             "/bin/tini -- /usr/l…"   5 minutes ago   Up 5 minutes             0.0.0.0:8080->8080/tcp, :::8080->8080/tcp, 0.0.0.0:50000->50000/tcp, :::50000->50000/tcp   jenkins
$ docker logs -f ab5
...
Jenkins initial setup is required. An admin user has been created and a password generated.
Please use the following password to proceed to installation:
# 填入图1中。 Administrator password
d718f6bb3dfe46b1a721d66242c9b011
...

二. 配置Jenkins

2.1 启动配置

Docker 部署 Jenkins (一)_第1张图片 图1

Docker 部署 Jenkins (一)_第2张图片
图2
Docker 部署 Jenkins (一)_第3张图片
图3
Docker 部署 Jenkins (一)_第4张图片
图4
Docker 部署 Jenkins (一)_第5张图片
图5
Docker 部署 Jenkins (一)_第6张图片
图6
Docker 部署 Jenkins (一)_第7张图片
图7
Docker 部署 Jenkins (一)_第8张图片
图8

你可能感兴趣的:(docker,jenkins,servlet)