This repository was archived by the owner on Jul 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
60 lines (57 loc) · 2.3 KB
/
docker-compose.yml
File metadata and controls
60 lines (57 loc) · 2.3 KB
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
59
60
version: '2.1'
services:
jenkins-master:
build:
context: .
dockerfile: Dockerfile
args:
- IMAGE_ARG_ALPINE_MIRROR=${IMAGE_ARG_ALPINE_MIRROR:-mirror.tuna.tsinghua.edu.cn}
container_name: ${CONTAINER_HOST_NAME:-standalone.jenkins}
environment:
- JENKINS_SLAVE_AGENT_PORT=50000
hostname: ${CONTAINER_HOST_NAME:-standalone.jenkins}
image: ${IMAGE_PREFIX:-cirepo/}${IMAGE_NAME:-jenkins}:${IMAGE_TAG:-lts-alpine}
labels:
deploy.config.commit: ${LABEL_DEPLOY_CONFIG_COMMIT:-unknown}
deploy.config.name: ${LABEL_DEPLOY_CONFIG_NAME:-unknown}
deploy.config.ref: ${LABEL_DEPLOY_CONFIG_REF:-unknown}
deploy.util.commit: ${LABEL_DEPLOY_UTIL_COMMIT:-unknown}
deploy.util.ref: ${LABEL_DEPLOY_UTIL_REF:-unknown}
instance.name.short: ${LABEL_INSTANCE_NAME_SHORT:-standalone.jenkins}
instance.name: ${LABEL_INSTANCE_NAME:-127.0.0.1/jenkins/standalone}
networks:
local-network:
ipv4_address: ${IPV4_ADDRESS:-172.16.238.33}
#ipv6_address: ${IPV6_ADDRESS:-2001:3984:3989::33}
ports:
- "${EXTERNAL_JENKINS_8080_PORT:-18083}:8080"
- "${EXTERNAL_JENKINS_50000_PORT:-50000}:50000/tcp"
restart: always
volumes:
- jenkins_home:/var/jenkins_home
# With Docker Swarm
# `docker network rm ingress`
# `docker network create --ingress --driver=overlay --ipam-driver=default --subnet=10.255.0.0/16 --gateway=10.255.0.1 --opt com.docker.network.driver.mtu=1450 --opt com.docker.network.driver.overlay.vxlanid_list=4096 ingress`
# `docker network create --driver=overlay --ipam-driver=default --subnet=172.16.238.0/24 --gateway=172.16.238.1 --opt com.docker.network.driver.mtu=1450 --attachable local-network`
# Or without Docker Swarm
# `docker network create --driver=bridge --ipam-driver=default --subnet=172.16.238.0/24 --gateway=172.16.238.1 --opt com.docker.network.driver.mtu=1450 local-network`
networks:
local-network:
external: true
driver_opts:
com.docker.network.driver.mtu: 1450
driver: bridge
enable_ipv6: false
ipam:
driver: default
config:
- gateway: 172.16.238.1
- subnet: 172.16.238.0/24
#- subnet: 2001:3984:3989::/64
volumes:
jenkins_home:
driver: local
driver_opts:
type: none
device: ${PWD}/data/jenkins_home
o: bind