return ip when publish is empty
@@ -457,9 +457,13 @@ func (c *calcium) createAndStartContainer(
for _, port := range opts.Entrypoint.Publish {
data = append(data, fmt.Sprintf("%s:%s", ip, port.Port()))
}
+ if len(data) == 0 {
+ createContainerMessage.Publish[nn] = ip
+ } else {
createContainerMessage.Publish[nn] = strings.Join(data, ",")
}
}
+ }
createContainerMessage.Success = true
return createContainerMessage
