再修改一下

This commit is contained in:
2025-07-18 15:20:56 +08:00
parent 08dba0f888
commit c069ec7f92
2 changed files with 9 additions and 8 deletions

View File

@ -1,13 +1,15 @@
# 使用 JDK 8 作为构建环境
FROM openjdk:8-jdk
# 安装 Maven
RUN apt update && \
apt install -y maven && \
mvn --version
# 使用阿里云的 apt 镜像源Debian 11 bullseye
RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list && \
sed -i 's/security.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list
# 安装 Git用于代码拉取
RUN apt install -y git
# 更新包列表并安装 Maven 和 Git
RUN apt update && \
apt install -y maven git && \
mvn --version && \
git --version
# 设置工作目录
WORKDIR /home/jenkins/workspace