Merge pull request #57 from bboreham/56_display_version

Added 'weave version' command

Fixes #56
This commit is contained in:
rade committed 2014-09-15 16:53:24 +01:00
commit 3e0c0d6e55
2 files changed
+20

No files matched your search

+9
View File
@@ -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
+11
View File
@@ -8,6 +8,7 @@ usage() {
echo "weave expose <ipaddr>/<subnet>"
echo "weave hide <ipaddr>/<subnet>"
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