How to get docker container IP

Docker inspect can be used to get information including IP address about a container using its id or name.

$ docker inspect [container_name_or_id]

To get only IP address

$ docker inspect --format '{{.NetworkSettings.IPAddress}}' nginx1
Share this article: share on Google+ share on facebook share on linkedin tweet this submit to reddit


Click here to write/view comments