docker pull jenkins/jenkins:lts-centos7-jdk8
2.docker-compose.yml
bash
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
volumes:
jenkins_home:
3.访问界面
安装完成长这样
安装jenkins插件: