Skip to content

Commit

Permalink
don't show blank ips metadata row for containers with no IP
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbellamy committed Feb 12, 2016
1 parent fc06569 commit d427e38
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion probe/docker/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,10 @@ func (c *container) GetNode(hostID string, localAddrs []net.IP) report.Node {
c.RLock()
defer c.RUnlock()

ips := append(c.container.NetworkSettings.SecondaryIPAddresses, c.container.NetworkSettings.IPAddress)
ips := c.container.NetworkSettings.SecondaryIPAddresses
if c.container.NetworkSettings.IPAddress != "" {
ips = append(ips, c.container.NetworkSettings.IPAddress)
}
// Treat all Docker IPs as local scoped.
ipsWithScopes := []string{}
for _, ip := range ips {
Expand Down

0 comments on commit d427e38

Please sign in to comment.