官网下载Jenkins
https://www.jenkins.io/zh/download/
构建jenkins镜像
# docker build -t jenkins:2.277.3 . from ubuntu:latest run sed -i 's/ports.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list run apt-get update run apt-get install -y openjdk-8-jdk run apt-get install -y python3.8 run ln -s /usr/bin/python3.8 /usr/bin/python run mkdir -p /data copy jenkins.war /data/jenkins.war workdir /data EXPOSE 8080 cmd ["java", "-jar", "jenkins.war"] # docker run -d --name=jenkins --restart=always -p 8080:8080 -v /data/v/jenkins/.jenkins:/root/.jenkins jenkins:2.277.3