Merge pull request #72 from TortleWortle/patch-1

Allow multiple publishing on multiple interfaces on same port.
This commit is contained in:
Dane Everitt 2020-12-02 08:18:38 -08:00 committed by GitHub
commit dc41126e25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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