Docker get private ip address of container
Tue 08 July 2014 | Last updated on Tue 06 December 2022In order to access other containers from a container it's needed to get the private IP address of the other containers. The following command is able to get the private ip address of the container.
$ docker inspect --format="{{.NetworkSettings.IPAddress}}" $CONTAINER_ID_OR_NAME
172.17.0.15