Also show image name of the connected container

This commit is contained in:
Guido Diepen 2017-04-25 10:08:52 +02:00
parent b4c25c1871
commit 38c6ef5988

View File

@ -17,7 +17,7 @@ do
if (( $num_related_containers > 0 )) if (( $num_related_containers > 0 ))
then then
echo " Connected containers:" echo " Connected containers:"
docker ps -a --filter=volume=${docker_volume_id} --format "{{.Names}} ({{.Status}})" | while read containerDetails docker ps -a --filter=volume=${docker_volume_id} --format "{{.Names}} [{{.Image}}] ({{.Status}})" | while read containerDetails
do do
echo " ${containerDetails}" echo " ${containerDetails}"
done done