mirror of
/repos/baseimage-docker.git
synced 2026-02-26 17:32:03 +01:00
Fix test runner: obtain container IP with 'docker inspect'
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user