append node ID to names

This commit is contained in:
Victor Vieux 2014-11-13 02:52:00 +00:00
parent 2aa28cf8a1
commit 39b83819aa
1 changed files with 5 additions and 0 deletions

View File

@ -64,6 +64,11 @@ func getContainersJSON(c *HttpApiContext, w http.ResponseWriter, r *http.Request
if !strings.Contains(tmp.Status, "Up") && !all {
continue
}
// TODO remove the Node ID in the name when we have a good solution
tmp.Names = make([]string, len(container.Names))
for i, name := range container.Names {
tmp.Names[i] = "/" + container.Node().ID + name
}
tmp.Ports = make([]dockerclient.Port, len(container.Ports))
for i, port := range container.Ports {
tmp.Ports[i] = port