diff --git a/README.md b/README.md index 7d661868..83363843 100644 --- a/README.md +++ b/README.md @@ -349,6 +349,15 @@ quickly enough. ## Troubleshooting +Check what version of weave you are running: + + weave version + +and compare against https://registry.hub.docker.com/u/zettio/weave/tags/manage/. +If you don't have the latest released version you can download it with: + + docker pull zettio/weave + Check the weave container logs with docker logs weave diff --git a/weaver/weave b/weaver/weave index 189be878..77a28173 100755 --- a/weaver/weave +++ b/weaver/weave @@ -8,6 +8,7 @@ usage() { echo "weave expose /" echo "weave hide /" echo "weave status" + echo "weave version" echo "weave stop" echo "weave reset" exit 1 @@ -185,6 +186,16 @@ case "$COMMAND" in exit 1 fi ;; + version) + # Try the running container first; if no luck try the image + if ! DOCKERIMAGE=$(docker inspect --format='{{ .Image }}' weave 2>/dev/null) ; then + if ! DOCKERIMAGE=$(docker inspect --format='{{ .Id }}' zettio/weave 2>/dev/null) ; then + echo "Unable to find zettio/weave image." >&2 + exit 1 + fi + fi + docker images --no-trunc | grep $DOCKERIMAGE | grep -v latest | tr -s ' ' | cut -d ' ' -f 2 + ;; run) [ $# -gt 0 ] || usage IPADDR=$1