From db9139a0cd8548672565e8a69af77155c3188c78 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Mon, 28 Mar 2016 16:03:20 +0100 Subject: [PATCH] correct `weave attach` example --- site/using-weave/dynamically-attach-containers.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/site/using-weave/dynamically-attach-containers.md b/site/using-weave/dynamically-attach-containers.md index 4c60af58..44280789 100644 --- a/site/using-weave/dynamically-attach-containers.md +++ b/site/using-weave/dynamically-attach-containers.md @@ -6,17 +6,17 @@ layout: default When containers may not know the network to which they will be attached, Weave Net enables you to dynamically attach and detach containers to and from a given network, even when a container is already running. -To illustrate these scenarios, imagine a netcat service running in a container on $host1 and you need to attach it to another subnet. To attach the netcat service container to a given subnet run: +To illustrate... host1$ C=$(docker run -e WEAVE_CIDR=none -dti ubuntu) host1$ weave attach $C 10.2.1.3 -Where, +where, - * `C=$(docker run -e WEAVE_CIDR=none -dti ubuntu)` is a variable for the subnet on which to attach - * `weave attach` – the Weave Net command to attach to the specified subnet, which takes the variable for the subnet - * `10.2.1.3` - the allocated IP address output by `weave attach` and in this case, represents the default subnet + * `C=$(docker run -e WEAVE_CIDR=none -dti ubuntu)` starts a container and assigns its ID to a variable + * `weave attach` – the Weave Net command to attach to the specified container + * `10.2.1.3` - the allocated IP address output by `weave attach`, in this case in the default subnet >>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.