Skip to main content

Get IP address of a docker machine

Run following command on host machine to get IP address of your docker container.

docker inspect --format '{{ .NetworkSettings.IPAddress }}' <container_id>
you can also get complete details of you docker container by running

docker inspect <container_id>
container_id can be obtainer by running

docker ps