inspect output changed

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
Thomas Sjögren 2015-12-22 19:46:32 +01:00
commit 00a1270c9b
2 changed files with 28 additions and 4 deletions

View file

@ -15,7 +15,13 @@ else
set -f; IFS=$'
'
for c in $containers; do
volumes=$(docker inspect --format '{{ .Volumes }}' "$c")
docker inspect --format '{{ .Volumes }}' "$c" 2>/dev/null 1>&2
if [ $? -eq 0 ]; then
volumes=$(docker inspect --format '{{ .Volumes }}' "$c")
else
volumes=$(docker inspect --format '{{ .Config.Volumes }}' "$c")
fi
if [ "$volumes" = "map[]" ]; then
# If it's the first container, fail the test