mercredi 3 août 2022

docker : list containers in a specific network

 

List containers in a precise 


$ docker network ls
NETWORK ID     NAME                               DRIVER    SCOPE
f732a9b3c5a1   bridge                             bridge    local
7ec614323767   host                               host      local
...



docker network inspect     -f '{{ range $key, $value := .Containers }}{{printf "%s: %s\n" $key .Name}}{{ end }}' <NETWORK NAME>
<ID> <Name>