Get container IP using docker cli

The --format option of inspect comes to the rescue:

docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' {{ name_or_id }}