Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
return ip when publish is empty
  • Loading branch information
timfeirg authored and CMGS committed Nov 25, 2017
1 parent 48c9631 commit 17403cf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cluster/calcium/create_container.go
Expand Up @@ -457,7 +457,11 @@ func (c *calcium) createAndStartContainer(
for _, port := range opts.Entrypoint.Publish {
data = append(data, fmt.Sprintf("%s:%s", ip, port.Port()))
}
createContainerMessage.Publish[nn] = strings.Join(data, ",")
if len(data) == 0 {
createContainerMessage.Publish[nn] = ip
} else {
createContainerMessage.Publish[nn] = strings.Join(data, ",")
}
}
}

Expand Down

0 comments on commit 17403cf

Please sign in to comment.