-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
78 lines (72 loc) · 1.65 KB
/
docker-compose.test.yml
File metadata and controls
78 lines (72 loc) · 1.65 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
# Docker Compose for Zond Topological Integration Testing
# Simulates LAN discovery, multi-NIC usage, and Routed segments.
services:
scanner:
build:
context: .
dockerfile: docker/scanner/Dockerfile
container_name: zond-integration-scanner
cap_add:
- NET_ADMIN
- NET_RAW
networks:
- lan_network
- extra_network
environment:
- ZOND_LOG=trace
gateway:
image: debian:bookworm-slim
container_name: zond-gateway
cap_add:
- NET_ADMIN
command: >
sh -c "apt-get update && apt-get install -y iproute2 iptables &&
echo 1 > /proc/sys/net/ipv4/ip_forward &&
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE &&
tail -f /dev/null"
networks:
- lan_network
- isolated_network
target-lan:
build:
context: .
dockerfile: docker/targets/Dockerfile
container_name: zond-target-lan
cap_add:
- NET_ADMIN
networks:
- lan_network
target-extra:
build:
context: .
dockerfile: docker/targets/Dockerfile
container_name: zond-target-extra
cap_add:
- NET_ADMIN
networks:
- extra_network
target-isolated:
build:
context: .
dockerfile: docker/targets/Dockerfile
container_name: zond-target-isolated
cap_add:
- NET_ADMIN
networks:
- isolated_network
networks:
lan_network:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/24
extra_network:
driver: bridge
ipam:
config:
- subnet: 172.25.0.0/24
isolated_network:
driver: bridge
ipam:
config:
- subnet: 172.30.0.0/24