mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
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:
parent
41c1c6501e
commit
cb8cc56c22
1 changed files with 6 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue