Discovering information about your container

dockerUsing the docker inspect command you can discover comprehensive information about your containers.

 


docker inspect

This command will display extensive information about the container called container-01.

$ sudo docker inspect container-01
[
{
"Id": "1d75fb6fb4b14bbe8696494ebf48c8ad285ba875afb29b421fb97b31399f65b5",
"Created": "2018-06-27T13:49:44.109045299Z",
"Path": "/bin/bash",
...

 

However if you just wanted to know its running state you could type the following:

$ sudo docker inspect --format='{{ .State.Running }}' container-01
true

... or its IP address:

$ sudo docker inspect --format='{{ .NetworkSettings.IPAddress }}' container-01
172.17.0.2

 

Thanks for visiting.