-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
46 lines (42 loc) · 1011 Bytes
/
docker-compose.yml
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
version: '2.0'
networks:
jenkins-network:
driver: bridge
volumes:
data:
certs:
services:
dind:
container_name: jenkins-docker
image: docker:dind
privileged: true
restart: unless-stopped
networks:
jenkins-network:
aliases:
- docker
volumes:
- data:/home/jenkins/agent:rw
- certs:/certs/client
environment:
- DOCKER_TLS_CERTDIR=/certs
jenkins:
container_name: jenkins-agent
build:
context: ./
args:
JENKINS_URL: ${JENKINS_URL}
JENKINS_SECRET: ${JENKINS_SECRET}
env_file:
- ./.env
restart: unless-stopped
networks:
- jenkins-network
volumes:
- data:/home/jenkins/agent:rw
- certs:/certs/client:ro
environment:
- DOCKER_HOST=tcp://docker:2376
- DOCKER_CERT_PATH=/certs/client
- DOCKER_TLS_VERIFY=1
command: java -jar /usr/share/jenkins/agent.jar -jnlpUrl ${JENKINS_URL} -secret ${JENKINS_SECRET} -workDir /home/jenkins/agent