Inspecting Network

Difficulty: Intermediate

Question

How do you find the IP address of a running container?

Answer

Use `docker inspect <container_id>` and look under the `NetworkSettings` section, or run `docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' <container_id>`.

Concepts covered

Network, Inspect