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, }