From cb8cc56c225cfc74b81f22a0f2ca8ce7bdccfe04 Mon Sep 17 00:00:00 2001 From: Kenfe-Mickael Laventure Date: Wed, 16 Mar 2016 13:26:15 -0700 Subject: [PATCH] Fix inspect to print bind mounts source path instead of an empty string Signed-off-by: Kenfe-Mickael Laventure --- api/client/formatter/custom.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/api/client/formatter/custom.go b/api/client/formatter/custom.go index 9ac457a41..2bb26a3db 100644 --- a/api/client/formatter/custom.go +++ b/api/client/formatter/custom.go @@ -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) }