Fix inspect to print bind mounts source path instead of an empty string

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
Kenfe-Mickael Laventure 2016-03-16 13:26:15 -07:00
parent 41c1c6501e
commit cb8cc56c22
1 changed files with 6 additions and 1 deletions

View File

@ -146,9 +146,14 @@ func (c *containerContext) Label(name string) string {
func (c *containerContext) Mounts() string {
c.addHeader(mountsHeader)
var name string
var mounts []string
for _, m := range c.c.Mounts {
name := m.Name
if m.Name == "" {
name = m.Source
} else {
name = m.Name
}
if c.trunc {
name = stringutils.Truncate(name, 15)
}