Allow custom specification of host ports range for automatic assignment
- Dominant language
- Shell
- Stars
- 5.4k
- Forks
- 334
- PR merge metrics
- No merged PRs in 30d
Description
## Summary
According to [PortMapping](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PortMapping.html) you can omit the hostPort (or set it to 0) while specifying a containerPort and your container automatically receives a port in the ephemeral port range for your container instance operating system and Docker version, whereas default ephemeral port range from 49153 through 65535 is used.
We want to be able to specify the port range e.g. using environment variables, without modifying the port range on the OS level.
### Description
We want to be able to specify e.g. that the hostPorts will be automatically allocated only from the range 50000 through 50500. But we do not want to change the ephemeral (dynamic) port range on the OS level (Windows in our case), because this has negative side effects.
Can we somehow achieve this or is this a new feature request?
Contributor guide
Research direction
Start with the linked AWS PortMapping documentation and the described Windows ephemeral-port behavior. Compare the requested 50000–50500 allocation range with the current ECS behavior and determine whether a service-level configuration can support it without changing the operating system; done means the supported approach or feature requirements are documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, docker
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100