version: '3' services: jenkins: image: jenkins/jenkins:lts privileged: true user: root restart: always container_name: jenkins ports: - "9900:8080" - "50000:50000" volumes: - /var/run/docker.sock:/var/run/docker.sock - /usr/local/bin/docker:/usr/bin/docker - /Users/xiaochuan/Documents/public/jenkins_home:/var/jenkins_home sed -i 's/http:\/\/updates.jenkins-ci.org\/download/https:\/\/mirrors.tuna.tsinghua.edu.cn\/jenkins/g' default.json && sed -i 's/http:\/\/www.google.com/https:\/\/www.baidu.com/g' default.json