gliderlabs / resolvable

Host-level DNS gateway for Docker
MIT License
315 stars 37 forks source link

Added by Schinti95: IP Address lookup when using docker networks. #24

Open fjmk opened 8 years ago

fjmk commented 8 years ago

As of Docker 1.10, the docker daemon implements an embedded DNS server which provides built-in service discovery for any container created with a valid name or net-alias or aliased by link.

I am using:

with a Version 2 yaml file. Composer adds a [dir]_default network by default.

I get errors when using gliderlabs/resolvable:master:

resolvable_1  | 2016/06/19 04:52:56 Starting resolvable 0.2 ...
resolvable_1  | 2016/06/19 04:52:56 got local address: 172.18.0.2
resolvable_1  | 2016/06/19 04:52:56 updating resolv.conf: /tmp/resolv.conf
resolvable_1  | 2016/06/19 04:52:56 error adding container d60615318259: unknown network mode%!(EXTRA string=drupal7_default)
resolvable_1  | 2016/06/19 04:52:56 error adding container d60615318259: unknown network mode%!(EXTRA string=drupal7_default)
resolvable_1  | 2016/06/19 04:52:56 error adding container 9f4c649a0fcf: unknown network mode%!(EXTRA string=drupal7_default)

After building Schinti95's repo, the errors are gone:

resolvable_1  | 2016/06/19 05:05:21 Starting resolvable 0.2 ...
resolvable_1  | 2016/06/19 05:05:21 got local address: 172.18.0.2
resolvable_1  | 2016/06/19 05:05:21 updating resolv.conf: /tmp/resolv.conf
resolvable_1  | 2016/06/19 05:05:21 Found Container with IP:  172.18.0.2 from Network:  drupal7_default
resolvable_1  | 2016/06/19 05:05:21 Found Container with IP:  172.18.0.3 from Network:  drupal7_default

Looks good to me.