This commit is contained in:
Aleksander Cynarski 2018-06-08 17:00:07 +02:00
parent 55f4721837
commit d5e78f207d

View File

@ -12,3 +12,44 @@ server=/consul/127.0.0.1#8600
Dzięki takiej konfiguracji demon docker'a korzystający z lokalnego DNS'a będzie miał dostęp do domen tworzonych przez consul'a
Przykład:
```
dig consul.service.dev.consul SRV
; <<>> DiG 9.12.1-P2 <<>> consul.service.dev.consul SRV
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23082
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 7, AUTHORITY: 0, ADDITIONAL: 9
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;consul.service.dev.consul. IN SRV
;; ANSWER SECTION:
consul.service.dev.consul. 0 IN SRV 1 1 8300 ac190003.addr.dev.consul.
consul.service.dev.consul. 0 IN SRV 1 1 8300 b39af5152084.node.dev.consul.
consul.service.dev.consul. 0 IN SRV 1 1 8600 ac190003.addr.dev.consul.
consul.service.dev.consul. 0 IN SRV 1 1 8400 ac190003.addr.dev.consul.
consul.service.dev.consul. 0 IN SRV 1 1 8302 ac190003.addr.dev.consul.
consul.service.dev.consul. 0 IN SRV 1 1 8301 ac190003.addr.dev.consul.
consul.service.dev.consul. 0 IN SRV 1 1 8500 ac190003.addr.dev.consul.
;; ADDITIONAL SECTION:
ac190003.addr.dev.consul. 0 IN A 172.25.0.3
b39af5152084.node.dev.consul. 0 IN A 127.0.0.1
b39af5152084.node.dev.consul. 0 IN TXT "consul-network-segment="
ac190003.addr.dev.consul. 0 IN A 172.25.0.3
ac190003.addr.dev.consul. 0 IN A 172.25.0.3
ac190003.addr.dev.consul. 0 IN A 172.25.0.3
ac190003.addr.dev.consul. 0 IN A 172.25.0.3
ac190003.addr.dev.consul. 0 IN A 172.25.0.3
;; Query time: 9 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: pią cze 08 16:59:32 CEST 2018
;; MSG SIZE rcvd: 514
```