forked from wardviaene/jenkins-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
31 lines (29 loc) · 937 Bytes
/
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
version: '3'
services:
jenkins:
image: jenkins-image
container_name: jenkins
restart: on-failure
ports:
- "${JENKINS_WEB_PORT:-8080}:8080"
- "${JENKINS_AGENT_PORT:-50000}:50000"
environment:
DOCKER_HOST: unix:///home/jenkins/docker.sock
JENKINS_WEB_PORT: 8080
JENKINS_AGENT_PORT: 50000
volumes:
- jenkins_home:/var/jenkins_home
- /var/run/docker.sock:/home/jenkins/docker.sock
# Shorthand below:
#- /var/run/docker.sock:/var/run/docker.sock:rw
#- type: bind
# source: /Users/weex/.docker/run/docker.sock
# target: /var/run/docker.sock
#command: ["/bin/bash", "-c", "chmod 660 /home/jenkins/docker.sock; chown root:daemon /home/jenkins/docker.sock; su jenkins; /usr/bin/tini -- /usr/local/bin/jenkins.sh"]
volumes:
jenkins_home:
driver: local
driver_opts:
type: none
o: bind
device: ${HOME}/jenkins_home