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 \
--name jenkins-lts-jdk11 \
--privileged \
-v /etc/timezone:/etc/timezone \
-v /etc/localtime:/etc/localtime \
-v /home/tester/data/docker/jenkins/jenkins_home:/var/jenkins_home \
-v /home/tester/data/docker/jenkins/home:/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 启动配置
图1文章来源:https://www.toymoban.com/news/detail-573854.html
图2
图3
图4
图5
图6
图7
图8文章来源地址https://www.toymoban.com/news/detail-573854.html
到了这里,关于Docker 部署 Jenkins (一)的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!