You can get container IP by inspecting the container ID or tag name.

# docker inspect <containerIDorName> | grep \"IPAddress\":
docker inspect test4 | grep \"IPAddress\":

You can also get container ID by entering the container with exec command and running

docker exec -it test4 /bin/sh

Now run

$ hostname
$ hostname -i

Outputs:

28c9b44ab6b3
172.17.0.3

0
Would love your thoughts, please comment.x
()
x