作者:勇胆识_156 | 来源:互联网 | 2023-09-18 12:15
1、安装docker-composecurl-Lhttps:get.daocloud.iodockercomposeeleasesdownload1.12.0docker-comp
1、安装docker-compose
curl -L https://get.daocloud.io/docker/compose/releases/download/1.12.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
2、配置文件
version: "3"
services:
jenkins:
container_name: jenkins
image: jenkins/jenkins:lts
restart: always
environment:
- TZ=Asia/Shanghai
ports:
- "8070:8080"
- "50000:50000"
volumes:
- /docker/jenkins/jenkins_home:/var/jenkins_home
- /docker/jenkins/run/docker.sock:/var/run/docker.sock
- /docker/jenkins/bin/docker:/usr/bin/docker
- /docker/jenkins/data/maven:/usr/local/maven
privileged: true
user: root