-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
79 lines (75 loc) · 1.69 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
services:
bind9:
build: ./bind9
image: bind9
container_name: dns-server
volumes:
- ./bind9/hosts:/etc/hosts
- ./bind9/named.conf.options:/etc/bind/named.conf.options
- ./bind9/named.conf.local:/etc/bind/named.conf.local
- ./bind9/zones:/etc/bind/zones/
- ./bind9/entrypoint.sh:/entrypoint.sh
entrypoint:
- bash
- entrypoint.sh
networks:
my-net-one:
ipv4_address: 172.20.0.2
my-net-two:
ipv4_address: 173.20.0.2
host1:
build: ./hostmachine
image: hostmachine:latest
container_name: host1
command: tail -F anything
hostname: host_1
volumes:
- ./hostmachine/resolv.conf:/etc/resolv.conf
dns:
- 172.20.0.2
networks:
my-net-one:
ipv4_address: 172.20.0.3
host2:
build: ./hostmachine
image: hostmachine:latest
container_name: host2
command: tail -F anything
hostname: host_2
volumes:
- ./hostmachine/resolv2.conf:/etc/resolv.conf
dns:
- 173.20.0.2
networks:
my-net-two:
ipv4_address: 173.20.0.4
host3:
build: ./hostmachine
image: hostmachine:latest
container_name: host3
command: tail -F anything
hostname: host_3
volumes:
- ./hostmachine/resolv.conf:/etc/resolv.conf
dns:
- 172.20.0.2
networks:
my-net-one:
ipv4_address: 172.20.0.5
networks:
my-net-one:
name: my-net-one
driver: bridge
ipam:
driver: default
config:
- subnet: 172.20.0.0/24
gateway: 172.20.0.254
my-net-two:
name: my-net-two
driver: bridge
ipam:
driver: default
config:
- subnet: 173.20.0.0/24
gateway: 173.20.0.254