Fix docker ps truncate long image name by default

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 3fcf481361400acd5e56da2a8c76cf888092b2e4
Component: engine
This commit is contained in:
Lei Jitang
2015-10-02 22:56:42 +08:00
parent b8616b16f4
commit 6f5edad812
6 changed files with 31 additions and 4 deletions
+3 -2
View File
@@ -288,8 +288,9 @@ func includeContainerInList(container *Container, ctx *listContext) iterationAct
// transformContainer generates the container type expected by the docker ps command.
func (daemon *Daemon) transformContainer(container *Container, ctx *listContext) (*types.Container, error) {
newC := &types.Container{
ID: container.ID,
Names: ctx.names[container.ID],
ID: container.ID,
Names: ctx.names[container.ID],
ImageID: container.ImageID,
}
img, err := daemon.Repositories().LookupImage(container.Config.Image)