diff --git a/README.md b/README.md index a633cee9..1b2a24e3 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,13 @@ On `$HOST1` run (as root) 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. +be done once on each host. The required docker image for the weave +router container is downloaded automatically. There is also a `weave +setup` command for downloading this and other images required for +weave operation; this is a strictly optional step which is especially +useful for automated installation of weave and ensures that any +subsequent weave commands do not encounter delays due to image +downloading. The second line runs our application container. We give it an IP address and network, in diff --git a/weave b/weave index 8b11b9d4..9e503f4f 100755 --- a/weave +++ b/weave @@ -5,6 +5,7 @@ SCRIPT_VERSION="(unreleased version)" usage() { echo "Usage:" + echo "weave setup" echo "weave launch [-password | -passwordfile ] ..." echo "weave launch-dns " echo "weave connect " @@ -447,6 +448,11 @@ DOCKER_VERSION_MINOR=$(echo "$DOCKER_VERSION" | cut -d. -f 2) DOCKER_VERSION_PATCH=$(echo "$DOCKER_VERSION" | cut -d. -f 3) case "$COMMAND" in + setup) + for img in $IMAGE $DNS_IMAGE $TOOLS_IMAGE ; do + docker pull $img + done + ;; launch) check_not_running $CONTAINER_NAME $BASE_IMAGE create_bridge