tidying around --dns-search
This commit is contained in:
1 parent
8406d08b77
commit
12d1af3a1c
1 file changed
+13
-14
+13
-14
@@ -55,9 +55,9 @@ HTTP API.
|
|||||||
|
|
||||||
### Supplying the DNS server
|
### Supplying the DNS server
|
||||||
|
|
||||||
If you want to use `docker run` to start a container, rather than
|
If you want to start containers with `docker run` rather than `weave
|
||||||
`weave run`, you can supply the weaveDNS IP as the `--dns` option to
|
run`, you can supply the weaveDNS IP as the `--dns` option to make it
|
||||||
make it use weaveDNS:
|
use weaveDNS:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ dns_ip=$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' weavedns)
|
$ 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
|
### Supplying the domain search path
|
||||||
|
|
||||||
Again, when using `docker run`, you will usually want to supply a
|
By default, Docker will provide containers with a `/etc/resolv.conf`
|
||||||
domain search path so that you can use unqualified hostnames. Use
|
that matches that for the host. In some circumstances, this may
|
||||||
`--dns-search=.` to make the resolver use the container's domain, or
|
include a DNS search path, which will break the nice "bare names
|
||||||
e.g., `--dns-search=weave.local` to make it look in `weave.local`.
|
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
|
### 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"
|
$ 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
|
## Present limitations
|
||||||
|
|
||||||
* The server will not know about restarted containers, but if you
|
* The server will not know about restarted containers, but if you
|
||||||
|
|||||||
Reference in new issue
Block a user