Browse Source

support mulitple bindings for same target port

Signed-off-by: Nicolas De Loof <[email protected]>
Nicolas De Loof 4 năm trước cách đây
mục cha
commit
fc25d3a54a
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      local/compose/create.go

+ 1 - 1
local/compose/create.go

@@ -532,7 +532,7 @@ func buildContainerPortBindingOptions(s types.ServiceConfig) nat.PortMap {
 	bindings := nat.PortMap{}
 	for _, port := range s.Ports {
 		p := nat.Port(fmt.Sprintf("%d/%s", port.Target, port.Protocol))
-		bind := []nat.PortBinding{}
+		bind := bindings[p]
 		binding := nat.PortBinding{
 			HostIP: port.HostIP,
 		}