mirror of
https://github.com/docker/compose.git
synced 2025-07-27 07:34:10 +02:00
Merge pull request #1657 from ndeloof/multi_ports
support mulitple bindings for same target port
This commit is contained in:
commit
0a02f7d108
@ -532,7 +532,7 @@ func buildContainerPortBindingOptions(s types.ServiceConfig) nat.PortMap {
|
|||||||
bindings := nat.PortMap{}
|
bindings := nat.PortMap{}
|
||||||
for _, port := range s.Ports {
|
for _, port := range s.Ports {
|
||||||
p := nat.Port(fmt.Sprintf("%d/%s", port.Target, port.Protocol))
|
p := nat.Port(fmt.Sprintf("%d/%s", port.Target, port.Protocol))
|
||||||
bind := []nat.PortBinding{}
|
bind := bindings[p]
|
||||||
binding := nat.PortBinding{
|
binding := nat.PortBinding{
|
||||||
HostIP: port.HostIP,
|
HostIP: port.HostIP,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user