Merge pull request #57 from bboreham/56_display_version
Added 'weave version' command Fixes #56
This commit is contained in:
commit
3e0c0d6e55
2 files changed
+20
No files matched your search
@@ -349,6 +349,15 @@ quickly enough.
|
|||||||
|
|
||||||
## Troubleshooting
|
## 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
|
Check the weave container logs with
|
||||||
|
|
||||||
docker logs weave
|
docker logs weave
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ usage() {
|
|||||||
echo "weave expose <ipaddr>/<subnet>"
|
echo "weave expose <ipaddr>/<subnet>"
|
||||||
echo "weave hide <ipaddr>/<subnet>"
|
echo "weave hide <ipaddr>/<subnet>"
|
||||||
echo "weave status"
|
echo "weave status"
|
||||||
|
echo "weave version"
|
||||||
echo "weave stop"
|
echo "weave stop"
|
||||||
echo "weave reset"
|
echo "weave reset"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -185,6 +186,16 @@ case "$COMMAND" in
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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)
|
run)
|
||||||
[ $# -gt 0 ] || usage
|
[ $# -gt 0 ] || usage
|
||||||
IPADDR=$1
|
IPADDR=$1
|
||||||
|
|||||||
Reference in new issue
Block a user