Merge pull request #72 from TortleWortle/patch-1
Allow multiple publishing on multiple interfaces on same port.
This commit is contained in:
@@ -38,15 +38,16 @@ func (a *Allocations) Bindings() nat.PortMap {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
binding := []nat.PortBinding{
|
binding := nat.PortBinding{
|
||||||
{
|
HostIP: ip,
|
||||||
HostIP: ip,
|
HostPort: strconv.Itoa(port),
|
||||||
HostPort: strconv.Itoa(port),
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
out[nat.Port(fmt.Sprintf("%d/tcp", port))] = binding
|
tcp := nat.Port(fmt.Sprintf("%d/tcp", port))
|
||||||
out[nat.Port(fmt.Sprintf("%d/udp", port))] = binding
|
udp := nat.Port(fmt.Sprintf("%d/udp", port))
|
||||||
|
|
||||||
|
out[tcp] = append(out[tcp], binding)
|
||||||
|
out[udp] = append(out[udp], binding)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user