-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
39 lines (35 loc) · 1.05 KB
/
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
version: "3.4"
services:
mydb_jenkins:
image: postgres:12.1
# if you define the build and image both, then image build from build tag, the image tag describe image name.
container_name: postgres_db_jenkins
restart: always
ports:
- 5432:5432
environment:
# do not put the password in the Dockerfile for the security issue
POSTGRES_USER: 'kensin'
POSTGRES_PASSWORD: 123
POSTGRES_DB: 'DEV_DB' # database name
jenkins:
image: jenkins/jenkins:lts-centos
container_name: jenkins
user: root
restart: always
ports:
- "50000:50000"
- "8081:8080"
volumes:
- ./jenkins_home:/var/jenkins_home
- /var/run/docker.sock:/var/run/docker.sock
- /usr/local/bin/docker:/usr/bin/docker
#$(which docker):/usr/bin/docker
#Test:
# 1. if not prerequsitely download the maven container, not test internet issue
#maveanTest:
# image: maven:3-alpine
# container_name: mavean_container
# restart: always
# volumes:
# - /Users/zhaoliang/.m2:/root/.m2