How can I get a container’s IP address from the host?

A quick and easy method to find the IP address of a container from the host can be achieved by running:

  • docker inspect --format '{{ .NetworkSettings.IPAddress }}' ${CID}