devxlogo

Retrieving Specific Information Using the Inspect Docker Command

Retrieving Specific Information Using the Inspect Docker Command

You can specify the information you want to return by requesting a specific element. For example, to return the container’s IP address, you should use this command:

$docker inspect -f '{{ range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' nostalgic_morse 172.17.0.5

devx-admin

Share the Post: