1
0
mirror of /repos/baseimage-docker.git synced 2025-12-30 08:01:31 +01:00

Fix test runner: obtain container IP with 'docker inspect'

This commit is contained in:
Hongli Lai (Phusion) 2015-12-08 12:25:42 +01:00
parent d141556910
commit bfd971a084

View File

@ -21,7 +21,7 @@ ID=`docker run -d -v $PWD/test:/test $NAME:$VERSION /sbin/my_init --enable-insec
sleep 1 sleep 1
echo " --> Obtaining IP" echo " --> Obtaining IP"
IP=`docker inspect $ID | grep IPAddress | sed -e 's/.*: "//; s/".*//'` IP=`docker inspect -f "{{ .NetworkSettings.IPAddress }}" "$ID"`
if [[ "$IP" = "" ]]; then if [[ "$IP" = "" ]]; then
abort "Unable to obtain container IP" abort "Unable to obtain container IP"
fi fi