mirror of
https://github.com/docker/docs.git
synced 2026-04-02 17:28:55 +07:00
Update filter volume to allow filtering by bind mount source
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user