Merge pull request #1657 from ndeloof/multi_ports

support mulitple bindings for same target port
This commit is contained in:
Guillaume Tardif 2021-05-12 09:37:02 +02:00 committed by GitHub
commit 0a02f7d108
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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