Fix inspect to print bind mounts source path instead of an empty string
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com> Upstream-commit: cb8cc56c225cfc74b81f22a0f2ca8ce7bdccfe04 Component: engine
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user