Jenkins
Pull
docker pull jenkins/jenkins
compose
docker-compose up -d
version: '3.8'
services:
jenkins:
image: jenkins/jenkins:lts
privileged: true
user: root
ports:
- 8080:8080
- 50000:50000
container_name: jenkins
environment:
- JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Xmx1024m -XX:MaxPermSize=512m"
volumes:
- /Users/${myname}/jenkins_compose/jenkins_configuration:/var/jenkins_home
- /var/run/docker.sock:/var/run/docker.sock
- 將 ${myname} 改成你的路徑
- http://localhost:8080 就可以看到頁面
與Github連結, webhook
- Github 的
repository > Settings > Webhookspayload URL 填上你的Jenkins的url, 路徑補上/github-webhook/. 像是htts://jenkins.kk.yy/github-webhook/

- Jenkins上設定觸發
