-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
112 lines (107 loc) · 2.35 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
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
services:
onos:
image: onosproject/onos:2.7-latest
container_name: onos
hostname: onos
privileged: true
networks:
- default
environment:
- ONOS_APPS=drivers,fpm,openflow,gui2
ports:
- "2620:2620"
- "6653:6653"
- "8101:8101"
- "8181:8181"
tty: true
stdin_open: true
h1:
image: host
container_name: h1
privileged: true
build:
context: .
dockerfile: containers/host/Dockerfile
cap_add:
- NET_ADMIN
- NET_BROADCAST
entrypoint: ["/bin/sh","-c"]
command:
- |
ip route del default
ip -6 route del default
sleep infinity
h2:
image: host
container_name: h2
privileged: true
build:
context: .
dockerfile: containers/host/Dockerfile
cap_add:
- NET_ADMIN
- NET_BROADCAST
networks:
R2h2br:
ipv4_address: 172.17.55.2
ipv6_address: "2a0b:4e07:c4:155::2"
entrypoint: ["/bin/sh","-c"]
command:
- |
ip route del default
ip -6 route del default
ip route add default via 172.17.55.1
ip -6 route add default via 2a0b:4e07:c4:155::1
sleep infinity
r1:
container_name: R1
hostname: R1
privileged: true
build:
context: .
dockerfile: containers/frr/Dockerfile
sysctls:
- net.ipv4.ip_forward=1
- net.ipv6.conf.all.forwarding=1
cap_add:
- NET_ADMIN
- NET_BROADCAST
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- ./config/daemons:/etc/frr/daemons
- ./config/R1/frr.conf:/etc/frr/frr.conf
r2:
container_name: R2
hostname: R2
privileged: true
build:
context: .
dockerfile: containers/frr/Dockerfile
sysctls:
- net.ipv4.ip_forward=1
- net.ipv6.conf.all.forwarding=1
cap_add:
- NET_ADMIN
- NET_BROADCAST
networks:
R2h2br:
ipv4_address: 172.17.55.1
ipv6_address: 2a0b:4e07:c4:155::1
volumes:
- ./config/daemons:/etc/frr/daemons
- ./config/R2/frr.conf:/etc/frr/frr.conf
networks:
default:
driver: bridge
ipam:
config:
- subnet: 172.10.0.0/16
R2h2br:
driver: bridge
ipam:
config:
- subnet: 172.17.55.0/24
gateway: 172.17.55.3
- subnet: 2a0b:4e07:c4:155::/64
gateway: 2a0b:4e07:c4:155::3