1
0
mirror of https://github.com/docker/cli.git synced 2026-01-19 21:41:31 +03:00

Update filter volume to allow filtering by bind mount source

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 8451a08ed52b976fffb0cf34be0a48dcc36bdcbe
Component: engine
This commit is contained in:
Kenfe-Mickael Laventure
2016-03-16 14:10:16 -07:00
parent 0477d61856
commit 9fd3d4a31e

View File

@@ -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")