Merge branch '1.5'

This commit is contained in:
Bryan Boreham committed 2016-06-15 13:50:47 +01:00
commit bb203a2d18
16 files changed
+47 -39

No files matched your search

+5 -5
View File
@@ -26,13 +26,13 @@ specified.
Next, launch the two netcat containers onto the default subnet:
host1$ docker run --name a1 -ti ubuntu
host2$ docker run --name a2 -ti ubuntu
host1$ docker run --name a1 -ti weaveworks/ubuntu
host2$ docker run --name a2 -ti weaveworks/ubuntu
And then to test the isolation, launch a few more containers onto a different subnet:
host1$ docker run -e WEAVE_CIDR=net:10.2.2.0/24 --name b1 -ti ubuntu
host2$ docker run -e WEAVE_CIDR=net:10.2.2.0.24 --name b2 -ti ubuntu
host1$ docker run -e WEAVE_CIDR=net:10.2.2.0/24 --name b1 -ti weaveworks/ubuntu
host2$ docker run -e WEAVE_CIDR=net:10.2.2.0.24 --name b2 -ti weaveworks/ubuntu
Ping each container to confirm that they can talk to each other, but not to the containers of our first subnet:
@@ -54,7 +54,7 @@ Ping each container to confirm that they can talk to each other, but not to the
If required, a container can also be attached to multiple subnets when it is started using:
host1$ docker run -e WEAVE_CIDR="net:default net:10.2.2.0/24" -ti ubuntu
host1$ docker run -e WEAVE_CIDR="net:default net:10.2.2.0/24" -ti weaveworks/ubuntu
`net:default` is used to request the allocation of an address from the default subnet in addition to one from an explicitly specified range.
@@ -8,13 +8,13 @@ When containers may not know the network to which they will be attached, Weave N
To illustrate...
host1$ C=$(docker run -e WEAVE_CIDR=none -dti ubuntu)
host1$ C=$(docker run -e WEAVE_CIDR=none -dti weaveworks/ubuntu)
host1$ weave attach $C
10.2.1.3
where,
* `C=$(docker run -e WEAVE_CIDR=none -dti ubuntu)` starts a container and assigns its ID to a variable
* `C=$(docker run -e WEAVE_CIDR=none -dti weaveworks/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
+2 -2
View File
@@ -21,12 +21,12 @@ For example, we can launch a couple of containers on `$HOST1` and
On `$HOST1`:
host1$ docker run -e WEAVE_CIDR=10.2.1.1/24 -ti ubuntu
host1$ docker run -e WEAVE_CIDR=10.2.1.1/24 -ti weaveworks/ubuntu
root@7ca0f6ecf59f:/#
And `$HOST2`:
host2$ docker run -e WEAVE_CIDR=10.2.1.2/24 -ti ubuntu
host2$ docker run -e WEAVE_CIDR=10.2.1.2/24 -ti weaveworks/ubuntu
root@04c4831fafd3:/#
Then test that the container on `$HOST2` can be reached from the container on `$HOST1`: