Document flags to 'weave attach'

This commit is contained in:
Bryan Boreham authored and Marc CARRE committed 2017-04-12 12:15:42 +01:00
1 parent c223ff1c7d
commit 771f57029e
2 files changed
+11 -3

No files matched your search

@@ -20,8 +20,9 @@ where,
>Note If you are using the Weave Docker API proxy, it will have modified `DOCKER_HOST` to point to the proxy and therefore you will have to pass `-e WEAVE_CIDR=none` to start a container that _doesn't_ get automatically attached to the weave network for the purposes of this example.
If `weave attach` sees the container has a hostname with a domain-name, it
will add those into WeaveDNS.
If `weave attach` sees the container has a hostname with a
domain-name, it will add those into WeaveDNS (unless you turn this off
with the `--without-dns` argument).
host1$ docker run -dti --name=c1 --hostname=c1.weave.local weaveworks/ubuntu
host1$ weave attach c1
@@ -29,6 +30,12 @@ will add those into WeaveDNS.
host1$ weave dns-lookup c1
10.32.0.1
If you would like `/etc/hosts` to contain the Weave Net address (the
same way [the proxy does](/site/weave-docker-api/name-resolution-proxy.md)),
specify `--rewrite-hosts` when running `weave attach`:
host1$ weave attach --rewrite-hosts c1
### Dynamically Detaching Containers
A container can be detached from a subnet, by using the `weave detach` command:
+2 -1
View File
@@ -70,7 +70,8 @@ weave env [--restore]
weave connect [--replace] [<peer> ...]
forget <peer> ...
weave attach [<addr> ...] <container_id>
weave attach [--without-dns] [--rewrite-hosts] [--no-multicast-route]
[<addr> ...] <container_id>
detach [<addr> ...] <container_id>
weave expose [<addr> ...] [-h <fqdn>]