Refocus documentation around --name
This commit is contained in:
1 parent
d2b17690f9
commit
12fc760e4a
1 file changed
+11
-4
+11
-4
@@ -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
|
on every weave host, by invoking the weave script command
|
||||||
`launch-dns`. Application containers are then instructed to use
|
`launch-dns`. Application containers are then instructed to use
|
||||||
weaveDNS as their nameserver by supplying the `--with-dns` option when
|
weaveDNS as their nameserver by supplying the `--with-dns` option when
|
||||||
starting them. Giving any container a hostname in the `.weave.local`
|
starting them; containers so started also automatically register their
|
||||||
domain registers it in weaveDNS; containers started with `--with-dns`
|
container name in the weaveDNS domain. For example:
|
||||||
have a default hostname derived from their container name. For example:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ weave launch
|
$ weave launch
|
||||||
$ weave launch-dns 10.2.254.1/24
|
$ 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)
|
$ shell1=$(weave run --with-dns 10.2.1.26/24 -ti --name=ubuntu ubuntu)
|
||||||
$ docker attach $shell1
|
$ 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
|
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
|
its own, unique, IP address, in a subnet that is a) common to all
|
||||||
weaveDNS containers, b) disjoint from the application subnets, and c)
|
weaveDNS containers, b) disjoint from the application subnets, and c)
|
||||||
|
|||||||
Reference in new issue
Block a user