mirror of https://github.com/docker/compose.git
Merge pull request #1434 from docker/PortBindings
set PortBinding HostIP
This commit is contained in:
commit
3f502000e2
|
@ -366,7 +366,9 @@ func buildContainerPortBindingOptions(s types.ServiceConfig) nat.PortMap {
|
|||
for _, port := range s.Ports {
|
||||
p := nat.Port(fmt.Sprintf("%d/%s", port.Target, port.Protocol))
|
||||
bind := []nat.PortBinding{}
|
||||
binding := nat.PortBinding{}
|
||||
binding := nat.PortBinding{
|
||||
HostIP: port.HostIP,
|
||||
}
|
||||
if port.Published > 0 {
|
||||
binding.HostPort = fmt.Sprint(port.Published)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue