mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #4535 from vieux/fix_string_command
fix string in docker images
This commit is contained in:
commit
a5c6e08bd6
1 changed files with 5 additions and 1 deletions
|
@ -1007,7 +1007,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()
|
||||
|
|
Loading…
Add table
Reference in a new issue