Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit 3f50200

Browse files
authored
Merge pull request #1434 from docker/PortBindings
set PortBinding HostIP
2 parents dbabfe9 + 8f7e7ab commit 3f50200

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

local/compose/create.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,9 @@ func buildContainerPortBindingOptions(s types.ServiceConfig) nat.PortMap {
366366
for _, port := range s.Ports {
367367
p := nat.Port(fmt.Sprintf("%d/%s", port.Target, port.Protocol))
368368
bind := []nat.PortBinding{}
369-
binding := nat.PortBinding{}
369+
binding := nat.PortBinding{
370+
HostIP: port.HostIP,
371+
}
370372
if port.Published > 0 {
371373
binding.HostPort = fmt.Sprint(port.Published)
372374
}

0 commit comments

Comments
 (0)