-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
142vip.cn
committed
Dec 19, 2023
1 parent
1c2e4e2
commit 5855015
Showing
8 changed files
with
211 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM jenkins/jenkins:2.426.2-jdk17 | ||
|
||
## 设置管理用户 | ||
USER root | ||
|
||
## 安装核心依赖 | ||
RUN apt-get update && apt-get install -y lsb-release | ||
RUN curl -fsSLo /usr/share/keyrings/docker-archive-keyring.asc \ | ||
https://download.docker.com/linux/debian/gpg | ||
RUN echo "deb [arch=$(dpkg --print-architecture) \ | ||
signed-by=/usr/share/keyrings/docker-archive-keyring.asc] \ | ||
https://download.docker.com/linux/debian \ | ||
$(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list | ||
RUN apt-get update && apt-get install -y docker-ce-cli | ||
|
||
USER jenkins | ||
|
||
## 运行插件 | ||
RUN jenkins-plugin-cli --plugins "blueocean docker-workflow" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
## 构建自定义jenkins镜像 | ||
docker build -t jenkins . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
## | ||
## 支持服务: | ||
## - Jenkins 端口映射 8080(连接端口) 50000(管理端口) | ||
## | ||
## | ||
## 运行指令: | ||
## - 统一刷新启动 docker-compose up -d | ||
## - 挂掉 docker-compose down | ||
## - 重启 docker-compose restart | ||
## | ||
version: '3' | ||
services: | ||
jenkins: | ||
image: jenkins/jenkins | ||
container_name: jenkins | ||
hostname: jenkins_dev | ||
restart: unless-stopped | ||
ports: | ||
- "6080:8080" | ||
- "6081:50000" | ||
## 文件映射 | ||
volumes: | ||
- /etc/localtime:/etc/localtime:ro | ||
- $(pwd)/jenkins:/var/jenkins_home | ||
## 支持容器内使用Mac本机docker服务 | ||
## - /usr/local/bin/docker:/usr/bin/docker | ||
## - /var/run/docker.sock:/var/run/docker.sock | ||
environment: | ||
JENKINS_OPTS: "--prefix=/jenkins" | ||
JENKINS_ARGS: "--prefix=/jenkins" | ||
# 用户名 | ||
user: root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
## docker安装jenkins | ||
docker run \ | ||
--name jenkins-blueocean \ | ||
--restart=on-failure \ | ||
-d \ | ||
--env DOCKER_HOST=tcp://docker:2376 \ | ||
--env DOCKER_CERT_PATH=/certs/client \ | ||
--env DOCKER_TLS_VERIFY=1 \ | ||
--publish 8080:8080 \ | ||
--publish 50000:50000 \ | ||
--volume jenkins-data:/var/jenkins_home \ | ||
--volume jenkins-docker-certs:/certs/client:ro \ | ||
jenkins/jenkins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+34.7 KB
docs/manuscripts/develop-skill/code-manager/images/jenkins-cat-pwd.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters