Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
Refocus documentation around --name
Browse files Browse the repository at this point in the history
  • Loading branch information
awh committed Jun 11, 2015
1 parent d2b1769 commit 12fc760
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions site/weavedns.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,28 @@ 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

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)
Expand Down

0 comments on commit 12fc760

Please sign in to comment.