From bfd971a0845d80bad840ed036c11319b34c55d5f Mon Sep 17 00:00:00 2001 From: "Hongli Lai (Phusion)" Date: Tue, 8 Dec 2015 12:25:42 +0100 Subject: [PATCH] Fix test runner: obtain container IP with 'docker inspect' --- test/runner.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/runner.sh b/test/runner.sh index fd5691a..5b71b71 100755 --- a/test/runner.sh +++ b/test/runner.sh @@ -21,7 +21,7 @@ ID=`docker run -d -v $PWD/test:/test $NAME:$VERSION /sbin/my_init --enable-insec sleep 1 echo " --> Obtaining IP" -IP=`docker inspect $ID | grep IPAddress | sed -e 's/.*: "//; s/".*//'` +IP=`docker inspect -f "{{ .NetworkSettings.IPAddress }}" "$ID"` if [[ "$IP" = "" ]]; then abort "Unable to obtain container IP" fi