参考文档:
https://www.jenkins.io/doc/book/installing/
To use the latest LTS
docker pull jenkins/jenkins:lts-jdk11
docker-compose.yml
version: "3.1" services: jenkins: image: jenkins/jenkins:lts-jdk11 container_name: jenkins-docker ports: - 8080:8080 - 50000:50000 volumes: - ./data/:/var/jenkins_home
docker-compose 启动jenkins
启动 docker-compose -f jenkins-compose.yml up -d # 查看启动日志 docker logs jenkins-docker # 修改权限 chmod -R 777 data
Browse to http://ip:8080
docker logs jenkins-docker 可以查看password
Install suggested plugins - to install the recommended set of plugins, which are based on most common use cases.
继续选择admin 作为 管理员
完成安装。