How to get container ip address inside this container?
\'docker inspect $hostname ...\' not suitable, because I don\'t share /var/run/docker.sock host file to contai
You could also look for a line in /etc/hosts that ends with a container id and print the first field:
sed -n 's/^\([0-9\.]*\)[[:blank:]]*[0-9a-f]\{12,\}$/\1/p' /etc/hosts
I'd use awk, but standard awk in dedian:jessie doesn't support regex quantifiers like {12,}.
{12,}