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:
parent
d141556910
commit
bfd971a084
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user