From 39b83819aaccf4f0bca152491cc07e37ac7a3729 Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Thu, 13 Nov 2014 02:52:00 +0000 Subject: [PATCH] append node ID to names --- api/api.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/api.go b/api/api.go index a2abec17cb..24f0f57967 100644 --- a/api/api.go +++ b/api/api.go @@ -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