-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
199 lines (188 loc) · 3.7 KB
/
docker-compose.yml
File metadata and controls
199 lines (188 loc) · 3.7 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
version: '3.8'
# volumes:
# user_data:
# driver: local
networks:
server_network:
driver: bridge
ipam:
config:
- subnet: 192.168.1.0/24
client_network:
driver: bridge
ipam:
config:
- subnet: 192.168.2.0/24
services:
router:
image: router-image
container_name: router
networks:
server_network:
ipv4_address: 192.168.1.100
client_network:
ipv4_address: 192.168.2.100
cap_add:
- NET_ADMIN
privileged: true
sysctls:
net.ipv4.ip_forward: 1
stdin_open: true
tty: true
dns:
- 192.168.1.10
server1:
build:
context: .
dockerfile: Dockerfile.server
image: server-image
container_name: server1
environment:
- LOCAL_IP=192.168.1.2
networks:
server_network:
ipv4_address: 192.168.1.2
stdin_open: true
tty: true
dns:
- 192.168.1.10
privileged: true
cap_add:
- NET_ADMIN
ports:
- "65442:65433"
server2:
build:
context: .
dockerfile: Dockerfile.server
image: server-image
container_name: server2
environment:
- LOCAL_IP=192.168.1.3
- JOIN_NODE=192.168.1.2:65433
networks:
server_network:
ipv4_address: 192.168.1.3
stdin_open: true
tty: true
dns:
- 192.168.1.10
privileged: true
cap_add:
- NET_ADMIN
ports:
- "65443:65433"
server3:
build:
context: .
dockerfile: Dockerfile.server
image: server-image
container_name: server3
environment:
- LOCAL_IP=192.168.1.4
- JOIN_NODE=192.168.1.2:65433
networks:
server_network:
ipv4_address: 192.168.1.4
stdin_open: true
tty: true
dns:
- 192.168.1.10
privileged: true
cap_add:
- NET_ADMIN
ports:
- "65444:65433"
server4:
build:
context: .
dockerfile: Dockerfile.server
image: server-image
container_name: server4
environment:
- LOCAL_IP=192.168.1.5
- JOIN_NODE=192.168.1.2:65433
networks:
server_network:
ipv4_address: 192.168.1.5
stdin_open: true
tty: true
dns:
- 192.168.1.10
privileged: true
cap_add:
- NET_ADMIN
ports:
- "65445:65433"
server5:
build:
context: .
dockerfile: Dockerfile.server
image: server-image
container_name: server5
environment:
- LOCAL_IP=192.168.1.6
- JOIN_NODE=192.168.1.2:65433
networks:
server_network:
ipv4_address: 192.168.1.6
stdin_open: true
tty: true
dns:
- 192.168.1.10
privileged: true
cap_add:
- NET_ADMIN
ports:
- "65446:65433"
client1:
image: client-image
container_name: client1
# volumes:
# - user_data:/app/user_data
networks:
client_network:
ipv4_address: 192.168.2.2
stdin_open: true
tty: true
dns:
- 192.168.1.10
extra_hosts:
- "gateway:192.168.2.100"
privileged: true
cap_add:
- NET_ADMIN
client2:
image: client-image
container_name: client2
# volumes:
# - user_data:/app/user_data
networks:
client_network:
ipv4_address: 192.168.2.3
stdin_open: true
tty: true
dns:
- 192.168.1.10
extra_hosts:
- "gateway:192.168.2.100"
privileged: true
cap_add:
- NET_ADMIN
client3:
image: client-image
container_name: client3
# volumes:
# - user_data:/app/user_data
networks:
client_network:
ipv4_address: 192.168.2.4
stdin_open: true
tty: true
dns:
- 192.168.1.10
extra_hosts:
- "gateway:192.168.2.100"
privileged: true
cap_add:
- NET_ADMIN