大量更新
This commit is contained in:
17
63-202504-CICD新/1-jenkins安装.txt
Normal file
17
63-202504-CICD新/1-jenkins安装.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
|
||||
docker network create jenkins
|
||||
|
||||
docker run --name jenkins-docker --rm --detach \
|
||||
--privileged --network jenkins --network-alias docker \
|
||||
--env DOCKER_TLS_CERTDIR=/certs \
|
||||
--volume jenkins-docker-certs:/certs/client \
|
||||
--volume jenkins-data:/var/jenkins_home \
|
||||
--publish 2376:2376 \
|
||||
docker:dind --storage-driver overlay2
|
||||
|
||||
|
||||
# build jenkins
|
||||
cd /root/wdd/jenkins-build
|
||||
|
||||
docker build -t harbor.cdcyy.com.cn/cmii/jenkins-wdd-blueocean:2.492.3-lts-jdk21 .
|
||||
13
63-202504-CICD新/1.1-自定义编译jenkins.dockerfile
Normal file
13
63-202504-CICD新/1.1-自定义编译jenkins.dockerfile
Normal file
@@ -0,0 +1,13 @@
|
||||
FROM jenkins/jenkins:2.492.3-lts-jdk21
|
||||
USER root
|
||||
RUN apt-get update && apt-get install -y lsb-release ca-certificates curl && \
|
||||
install -m 0755 -d /etc/apt/keyrings && \
|
||||
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc && \
|
||||
chmod a+r /etc/apt/keyrings/docker.asc && \
|
||||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] \
|
||||
https://mirrors.tuna.tsinghua.edu.cn $(. /etc/os-release && echo \"$VERSION_CODENAME\") stable" \
|
||||
| tee /etc/apt/sources.list.d/docker.list > /dev/null && \
|
||||
apt-get update && apt-get install -y docker-ce-cli && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
USER jenkins
|
||||
RUN jenkins-plugin-cli --plugins "blueocean docker-workflow"
|
||||
Reference in New Issue
Block a user