Quickly learn How to list all Docker containers of a Docker network with WhaleDeck Shorts. Clear, step-by-step guides for Docker.
The answer is quite simple. The following command shows how to get all Docker containers that are connect to the Docker network my_network including their ip addresses.
docker network inspect -f '{{range .Containers}}{{printf "%s: %s\n" .Name .IPv4Address}}{{end}}' my_network