فهرست منبع

Update filter volume to allow filtering by bind mount source

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Kenfe-Mickael Laventure 9 سال پیش
والد
کامیت
8451a08ed5
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      daemon/list.go

+ 5 - 1
daemon/list.go

@@ -328,7 +328,11 @@ func includeContainerInList(container *container.Container, ctx *listContext) it
 	if ctx.filters.Include("volume") {
 		volumesByName := make(map[string]*volume.MountPoint)
 		for _, m := range container.MountPoints {
-			volumesByName[m.Name] = m
+			if m.Name != "" {
+				volumesByName[m.Name] = m
+			} else {
+				volumesByName[m.Source] = m
+			}
 		}
 
 		volumeExist := fmt.Errorf("volume mounted in container")