jdk要求:
点击这里下载,这下载按钮隐藏地很好
docker pull jenkins/jenkins:latest
docker-compose.yml
version: '3'
services:
jenkins:
image: jenkins/jenkins:lts-centos7-jdk8
container_name: my-jenkins
ports:
- "8080:8080" # 映射 Jenkins Web 界面端口
volumes:
- jenkins_home:/var/jenkins_home
network_mode: host # 使用宿主机的网络
volumes:
jenkins_home: