jenkins&&docker安装
核心点是3个主要挂载的,socker.sock需要根据情况定,需要以root身份运行
version: '3'
services:
jenkins:
image: harbor.iovhm.com/hub/jenkins/jenkins:2.477-jdk17
container_name: jenkins
restart: always
privileged: true
user: root
ports:
- "8080:8080"
volumes:
- ./jenkins_home:/var/jenkins_home
- /var/run/docker.sock:/var/run/docker.sock
- /usr/bin/docker:/usr/bin/docker