57 lines
1.2 KiB
YAML
57 lines
1.2 KiB
YAML
services:
|
|
maindns:
|
|
image: internetsystemsconsortium/bind9:9.18
|
|
container_name: maindns
|
|
command: -u root -g -d 9 -f -c /etc/bind/named.conf
|
|
volumes:
|
|
- maindns_etc_bind:/etc/bind
|
|
- ./maindns_named.conf:/etc/bind/named.conf:ro
|
|
- ./db.example.com:/etc/bind/db.example.com:ro
|
|
tmpfs:
|
|
- /var/cache/bind
|
|
- /var/log
|
|
depends_on:
|
|
- subdns
|
|
networks:
|
|
dnsnet:
|
|
ipv4_address: 172.20.0.10
|
|
|
|
subdns:
|
|
image: internetsystemsconsortium/bind9:9.18
|
|
command: -u root -g -d 9 -f -c /etc/bind/named.conf
|
|
container_name: subdns
|
|
volumes:
|
|
- subdns_etc_bind:/etc/bind
|
|
- ./subdns_named.conf:/etc/bind/named.conf:ro
|
|
- ./db.sub.example.com:/etc/bind/db.sub.example.com:ro
|
|
tmpfs:
|
|
- /var/cache/bind
|
|
- /var/log
|
|
networks:
|
|
dnsnet:
|
|
ipv4_address: 172.20.0.20
|
|
|
|
client:
|
|
build:
|
|
dockerfile: client_Dockerfile
|
|
container_name: client
|
|
command: sleep infinity
|
|
depends_on:
|
|
- maindns
|
|
dns:
|
|
- 172.20.0.10
|
|
networks:
|
|
dnsnet:
|
|
ipv4_address: 172.20.0.100
|
|
|
|
networks:
|
|
dnsnet:
|
|
driver: bridge
|
|
ipam:
|
|
config:
|
|
- subnet: 172.20.0.0/24
|
|
|
|
volumes:
|
|
maindns_etc_bind:
|
|
subdns_etc_bind:
|