From 12d1af3a1cdac09a25dfa2e57a2f184409762b11 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Tue, 18 Nov 2014 15:50:17 +0000 Subject: [PATCH] tidying around --dns-search --- weavedns/README.md | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/weavedns/README.md b/weavedns/README.md index 632a077f..52714e88 100644 --- a/weavedns/README.md +++ b/weavedns/README.md @@ -55,9 +55,9 @@ HTTP API. ### Supplying the DNS server -If you want to use `docker run` to start a container, rather than -`weave run`, you can supply the weaveDNS IP as the `--dns` option to -make it use weaveDNS: +If you want to start containers with `docker run` rather than `weave +run`, you can supply the weaveDNS IP as the `--dns` option to make it +use weaveDNS: ```bash $ dns_ip=$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' weavedns) @@ -70,10 +70,16 @@ weave network (as in the last line above). ### Supplying the domain search path -Again, when using `docker run`, you will usually want to supply a -domain search path so that you can use unqualified hostnames. Use -`--dns-search=.` to make the resolver use the container's domain, or -e.g., `--dns-search=weave.local` to make it look in `weave.local`. +By default, Docker will provide containers with a `/etc/resolv.conf` +that matches that for the host. In some circumstances, this may +include a DNS search path, which will break the nice "bare names +resolve" property above. + +Therefore, when starting containers with `docker run` instead of +`weave run`, you will usually want to supply a domain search path so +that you can use unqualified hostnames. Use `--dns-search=.` to make +the resolver use the container's domain, or e.g., +`--dns-search=weave.local` to make it look in `weave.local`. ### Adding containers to DNS @@ -106,13 +112,6 @@ $ dns_ip=$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' weavedns) $ curl -X DELETE "http://$dns_ip:6785/name/$shell2/10.1.1.27" ``` -### Supplying `--dns-search=` - -By default, Docker will provide containers with a `/etc/resolv.conf` -that matches that for the host. In some circumstances, this may -include a DNS search path, which will break the nice "bare names -resolve" property above. - ## Present limitations * The server will not know about restarted containers, but if you