浏览代码

Merge pull request #1657 from ndeloof/multi_ports

support mulitple bindings for same target port
Guillaume Tardif 4 年之前
父节点
当前提交
0a02f7d108
共有 1 个文件被更改,包括 1 次插入1 次删除
  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,
 		}