昔のバージョンはこういう方法が流行っていましたが、
docker inspect 49ddbb6b8e91 | grep IPAddress | cut -d '"' -f 4
最新のDockerではinspect
コマンドに'-f'というオプションが追加したらしい。下記はマニュアルからの抜粋。
Usage: docker inspect CONTAINER|IMAGE [CONTAINER|IMAGE...]
Return low-level information on a container/image
-f, --format="" Format the output using the given go template.
すなわち、IPアドレスはこうのように取得出来ます。
docker inspect -f "{{ .NetworkSettings.IPAddress }}" $ID
-f
オプションは自由度の高いtext/templateとなっているため、思う通りなんでもカスタマイズできると思います。