blob: 4e678bba600f3e84698d1bc141f375870c19af29 [file] [log] [blame]
David K. Bainbridge2f3df262016-08-04 09:29:55 -07001#!/bin/bash
2
3test $# -ne 1 && echo "must specify the name of a container" && exit 1
4
5IP=$(docker inspect --format '{{.NetworkSettings.IPAddress}}' $1)
6
7if [ "$IP x" == " x" ]; then
8 IP=$(docker inspect --format '{{.NetworkSettings.Networks.maas_default.IPAddress}}' $1)
9fi
10
11/bin/echo -ne $IP