1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #15421 from maaquib/15418-ps-image-id-too-wide

Truncating image id is docker ps to a length of 12
This commit is contained in:
Brian Goff 2015-08-08 07:48:16 -04:00
commit cc73fc03e8

View file

@ -64,6 +64,9 @@ func (c *containerContext) Image() string {
if c.c.Image == "" { if c.c.Image == "" {
return "<no image>" return "<no image>"
} }
if c.trunc {
return stringutils.Truncate(c.c.Image, 12)
}
return c.c.Image return c.c.Image
} }