1
0
mirror of https://github.com/docker/cli.git synced 2026-01-16 20:22:36 +03:00

fix string in docker images

Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: bc086a9cd61b2d15fbef9db3cb53c7f3650fda48
Component: engine
This commit is contained in:
Victor Vieux
2014-03-07 20:07:17 +00:00
parent 5b857edcb5
commit c65746a97c

View File

@@ -1011,7 +1011,11 @@ func (srv *Server) Containers(job *engine.Job) engine.Status {
out.Set("Id", container.ID)
out.SetList("Names", names[container.ID])
out.Set("Image", srv.runtime.repositories.ImageName(container.Image))
out.Set("Command", fmt.Sprintf("%s %s", container.Path, strings.Join(container.Args, " ")))
if len(container.Args) > 0 {
out.Set("Command", fmt.Sprintf("\"%s %s\"", container.Path, strings.Join(container.Args, " ")))
} else {
out.Set("Command", fmt.Sprintf("\"%s\"", container.Path))
}
out.SetInt64("Created", container.Created.Unix())
out.Set("Status", container.State.String())
str, err := container.NetworkSettings.PortMappingAPI().ToListString()