修改CICD的jenkins构建脚本
This commit is contained in:
@@ -1,6 +1,15 @@
|
||||
FROM jenkins/jenkins:2.492.3-lts-jdk21
|
||||
|
||||
USER root
|
||||
RUN apt-get update && apt-get install -y lsb-release ca-certificates curl && \
|
||||
|
||||
# 使用国内镜像源加速(阿里云)
|
||||
RUN rm -rf /etc/apt/sources.list.d/* \
|
||||
&& echo "deb http://mirrors.aliyun.com/debian/ bookworm main non-free contrib" > /etc/apt/sources.list \
|
||||
&& echo "deb http://mirrors.aliyun.com/debian-security bookworm-security main" >> /etc/apt/sources.list \
|
||||
&& echo "deb http://mirrors.aliyun.com/debian/ bookworm-updates main non-free contrib" >> /etc/apt/sources.list
|
||||
|
||||
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 && \
|
||||
@@ -9,5 +18,7 @@ RUN apt-get update && apt-get install -y lsb-release ca-certificates curl && \
|
||||
| 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