From b9190e9be02260249b4e43b7d31ad51f01c9bd8b Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Sat, 6 Sep 2014 18:23:23 +0100 Subject: [PATCH 1/2] make app isolation example easier to read --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 49c54e05..e4419c3b 100644 --- a/README.md +++ b/README.md @@ -165,15 +165,18 @@ A quick 'ping' test in the containers confirms that they can talk to each other but not the containers of our first application... host1# docker attach $D + root@da50502598d5:/# ping -c 1 -q 10.0.2.2 PING 10.0.2.2 (10.0.2.2): 48 data bytes --- 10.0.2.2 ping statistics --- 1 packets transmitted, 1 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.562/0.562/0.562/0.000 ms + root@da50502598d5:/# ping -c 1 -q 10.0.1.1 PING 10.0.1.1 (10.0.1.1) 56(84) bytes of data. --- 10.0.1.1 ping statistics --- 1 packets transmitted, 0 received, 100% packet loss, time 0ms + root@da50502598d5:/# ping -c 1 -q 10.0.1.2 PING 10.0.1.2 (10.0.1.2) 56(84) bytes of data. --- 10.0.1.2 ping statistics --- From 86fc8695513b7cc471333690d9dc30e690488e3f Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Mon, 8 Sep 2014 08:59:05 +0100 Subject: [PATCH 2/2] simplify 'weave run' examples we don't need to specify /bin/bash, since that is the default entrypoint --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e4419c3b..b3cbf4d0 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ two containers, one on each host. On $HOST1 run (as root) host1# weave launch 10.0.0.1/16 - host1# C=$(weave run 10.0.1.1/24 -t -i ubuntu /bin/bash) + host1# C=$(weave run 10.0.1.1/24 -t -i ubuntu) The first line starts the weave router, in a container. This needs to be done once on each host. We tell weave that its IP address should @@ -80,7 +80,7 @@ unique. We repeat similar steps on $HOST2... host2# weave launch 10.0.0.2/16 $HOST1 - host2# C=$(weave run 10.0.1.2/24 -t -i ubuntu /bin/bash) + host2# C=$(weave run 10.0.1.2/24 -t -i ubuntu) The only difference, apart from the IP addresses, is that we tell our weave that it should peer with the weave running on $HOST1. We could @@ -158,8 +158,8 @@ To accomplish that, we assign each application a different subnet. So, in the above example, if we wanted to add another application similar to, but isolated from, our first, we'd launch the containers with... - host1# D=$(weave run 10.0.2.1/24 -t -i ubuntu /bin/bash) - host2# D=$(weave run 10.0.2.2/24 -t -i ubuntu /bin/bash) + host1# D=$(weave run 10.0.2.1/24 -t -i ubuntu) + host2# D=$(weave run 10.0.2.2/24 -t -i ubuntu) A quick 'ping' test in the containers confirms that they can talk to each other but not the containers of our first application... @@ -383,7 +383,7 @@ example above, the 'launch' command would be run like this: and the 'run' command like this: - host1# C=$(boot2docker ssh "sudo ./weave run 10.0.1.1/24 -t -i ubuntu /bin/bash") + host1# C=$(boot2docker ssh "sudo ./weave run 10.0.1.1/24 -t -i ubuntu") ## Building