Skip to content

Commit

Permalink
Merge pull request #15692 from kubernetes/revert-14290-issue12658
Browse files Browse the repository at this point in the history
Revert "Special case port mapping publish on macOS"
  • Loading branch information
spowelljr authored Jan 23, 2023
2 parents 34bdca0 + 99b4e45 commit bd734ef
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions pkg/drivers/kic/oci/oci.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,13 +488,8 @@ func generatePortMappings(portMappings ...PortMapping) []string {
for _, pm := range portMappings {
// let docker pick a host port by leaving it as ::
// example --publish=127.0.0.17::8443 will get a random host port for 8443
if runtime.GOOS == "darwin" {
publish := fmt.Sprintf("--publish=%d", pm.ContainerPort)
result = append(result, publish)
} else {
publish := fmt.Sprintf("--publish=%s::%d", pm.ListenAddress, pm.ContainerPort)
result = append(result, publish)
}
publish := fmt.Sprintf("--publish=%s::%d", pm.ListenAddress, pm.ContainerPort)
result = append(result, publish)
}
return result
}
Expand Down

0 comments on commit bd734ef

Please sign in to comment.