Refocus documentation around --name

This commit is contained in:
Adam Harrison committed 2015-06-11 12:17:05 +01:00
1 parent d2b17690f9
commit 12fc760e4a
1 file changed
+11 -4
+11 -4
View File
@@ -29,14 +29,13 @@ other over the weave network. One such container needs to be started
on every weave host, by invoking the weave script command
`launch-dns`. Application containers are then instructed to use
weaveDNS as their nameserver by supplying the `--with-dns` option when
starting them. Giving any container a hostname in the `.weave.local`
domain registers it in weaveDNS; containers started with `--with-dns`
have a default hostname derived from their container name. For example:
starting them; containers so started also automatically register their
container name in the weaveDNS domain. For example:
```bash
$ weave launch
$ weave launch-dns 10.2.254.1/24
$ weave run 10.2.1.25/24 -ti -h pingme.weave.local ubuntu
$ weave run --with-dns 10.2.1.25/24 -ti --name=pingme ubuntu
$ shell1=$(weave run --with-dns 10.2.1.26/24 -ti --name=ubuntu ubuntu)
$ docker attach $shell1
@@ -44,6 +43,14 @@ root@ubuntu:/# ping pingme
...
```
If you start an application container sans `--with-dns` you can still register
it in weaveDNS simply by giving the container a hostname in the
`.weave.local.` domain:
```
$ weave run 10.2.1.25/24 -ti -h pingme.weave.local ubuntu
```
Each weaveDNS container started with `launch-dns` needs to be given
its own, unique, IP address, in a subnet that is a) common to all
weaveDNS containers, b) disjoint from the application subnets, and c)