-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
58 lines (55 loc) · 1.39 KB
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
services:
docker:
image: docker:dind
container_name: dind
privileged: true
networks:
- jenkins
environment:
DOCKER_TLS_CERTDIR: /certs
volumes:
- jenkins-docker-certs:/certs/client
- jenkins_home:/var/jenkins_home:rw
ports:
- "2376:2376"
command: --storage-driver overlay2
jenkins:
image: jenkins-image:latest
#build: ./dockerfiles
#links:
# - "ssh-agent:ssh"
container_name: jenkins
restart: on-failure
networks:
- jenkins
environment:
DOCKER_HOST: tcp://docker:2376
DOCKER_CERT_PATH: /certs/client
DOCKER_TLS_VERIFY: 1
ports:
- "8080:8080"
- "50000:50000"
healthcheck:
test: ["CMD", "curl", "-f", "-u", "admin:11d308610c0b8145a44ffdb4bc4f9ac651", "http://localhost:8080/login"]
interval: 1m30s
timeout: 30s
retries: 5
start_period: 30s
volumes:
- jenkins_home:/var/jenkins_home:rw
- ./jobs:/var/jenkins_home/jobs:rw
- jenkins-docker-certs:/certs/client:ro
#ssh-agent:
# image: jenkins/ssh-agent
# container_name: ssh-agent
networks:
jenkins:
volumes:
jenkins_home:
name: "jenkins_home_dir"
labels:
com.jenkins.description: "Home Dir of Jenkins"
jenkins-docker-certs:
name: "jenkins-certs-mgmt"
labels:
com.jenkins.description: "Certs for docker and more. Just check install docs"