创建一个docker-jenkins-compose.yml文件
时间: 2023-11-12 11:40:23 浏览: 119
docker-compose.yml
5星 · 资源好评率100%
version: "3.7"
services:
jenkins:
image: jenkins/jenkins:lts
container_name: jenkins
ports:
- "8080:8080"
- "50000:50000"
volumes:
- jenkins_home:/var/jenkins_home
- /var/run/docker.sock:/var/run/docker.sock
- /usr/bin/docker:/usr/bin/docker
environment:
- DOCKER_HOST=tcp://docker:2375
- DOCKER_CERT_PATH=/certs/client
- DOCKER_TLS_VERIFY=1
networks:
- jenkins_network
docker:
image: docker:latest
container_name: docker
volumes:
- docker_data:/var/lib/docker
- /certs/client
networks:
- jenkins_network
networks:
jenkins_network:
volumes:
jenkins_home:
docker_data:
阅读全文