This changes how SSH forwarding ports are allocated when provisioning a Docker container. This changes port allocation to pick an arbitrary port number at random from the ephemeral port range, tests to see if the port is in use or not with a socket connection, and assigns the port if it is not in use.
This change allows for a large amount of containers to be provisioned as opposed to the 8 allowed beforehand due to the hard-coded port range. Additionally, this change moves the ports used from the well-known range to the ephemeral range reducing the potential for port conflicts.
This changes how SSH forwarding ports are allocated when provisioning a Docker container. This changes port allocation to pick an arbitrary port number at random from the ephemeral port range, tests to see if the port is in use or not with a socket connection, and assigns the port if it is not in use.
This change allows for a large amount of containers to be provisioned as opposed to the 8 allowed beforehand due to the hard-coded port range. Additionally, this change moves the ports used from the well-known range to the ephemeral range reducing the potential for port conflicts.