fix: translate configured server port into correct mapped host port
This commit is contained in:
parent
9bdf9e1e02
commit
920e82f11a
2 changed files with 134 additions and 8 deletions
|
@ -307,6 +307,13 @@ func (p Provider) getIPAddress(instance ecsInstance) string {
|
|||
|
||||
func getPort(instance ecsInstance, serverPort string) string {
|
||||
if len(serverPort) > 0 {
|
||||
for _, port := range instance.machine.ports {
|
||||
containerPort := strconv.FormatInt(port.containerPort, 10)
|
||||
if serverPort == containerPort {
|
||||
return strconv.FormatInt(port.hostPort, 10)
|
||||
}
|
||||
}
|
||||
|
||||
return serverPort
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue