From fc25d3a54afb27e484b75e2d97acb07664ae81de Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Mon, 10 May 2021 08:55:49 +0200 Subject: [PATCH] support mulitple bindings for same target port Signed-off-by: Nicolas De Loof --- local/compose/create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/compose/create.go b/local/compose/create.go index 4df60777f..d06bf5f65 100644 --- a/local/compose/create.go +++ b/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, }