Skip to content

Instantly share code, notes, and snippets.

@hanrw
Created September 26, 2017 12:02
Show Gist options
  • Save hanrw/49d9bcae71108a4c4f426d7905f8ce98 to your computer and use it in GitHub Desktop.
Save hanrw/49d9bcae71108a4c4f426d7905f8ce98 to your computer and use it in GitHub Desktop.
Jenkins build docker.
version: '2'
services:
activemq:
image: rmohr/activemq:5.10.0
volumes:
- /home/hanrenwei/Docker/activemq/conf/activemq.xml:/opt/activemq/conf/activemq.xml
- /home/hanrenwei/Docker/activemq/conf/groups.properties:/opt/activemq/conf/groups.properties
- /home/hanrenwei/Docker/activemq/conf/jetty-realm.properties:/opt/activemq/conf/jetty-realm.properties
- /home/hanrenwei/Docker/activemq/conf/users.properties:/opt/activemq/conf/users.properties
- /home/hanrenwei/Docker/activemq/data:/var/activemq/data
- /home/hanrenwei/Docker/activemq/lib/optional/mysql-connector-java-5.1.42-bin.jar:/opt/activemq/lib/optional/mysql-connector-java-5.1.42-bin.jar
links:
- mysql:database
ports:
- 61616:61616/tcp
- 8161:8161/tcp
labels:
io.rancher.scheduler.affinity:host_label: type=local
io.rancher.scheduler.global: 'true'
jenkins:
group_add:
- '999'
image: jenkins/jenkins:lts
stdin_open: true
volumes:
- /home/hanrenwei/Docker/var/jenkins_home:/var/jenkins_home
- /home/hanrenwei/.m2:/var/jenkins_home/.m2
- /var/run/docker.sock:/var/run/docker.sock
- /usr/bin/docker:/usr/bin/docker
- /usr/lib/x86_64-linux-gnu/libltdl.so.7:/usr/lib/x86_64-linux-gnu/libltdl.so.7
tty: true
ports:
- 38080:8080/tcp
labels:
io.rancher.container.pull_image: always
mysql:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: root
volumes:
- /home/hanrenwei/Docker/mysql:/var/lib/mysql
ports:
- 3306:3306/tcp
labels:
io.rancher.scheduler.affinity:host_label: type=local
io.rancher.scheduler.global: 'true'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment