Open davidfowl opened 3 months ago
We could. This wasn't deemed a priority because, typically, the program that is running inside a container is the only game in town, and it can choose whatever port is convenient and stick to it, as long as the container image allows for using that port.
Note that by default Aspire-orchestrated containers are proxied by container orchestrator and by DCP, and from the client perspective, the ports that clients use to communicate with these containers are dynamic, unless fixed by app model.
What is the motivation behind this idea?
Now that we have docker file building it’ll be possible to build experiences where you can flip between docker and local, and it would be ideal if you didn’t have to change endpoint configuration as a result.
OK I buy that. We would have to make some assumptions about the range of ports that we could use for dynamic port allocation, but overall this should not be too hard to do.
@karolz-ms can we support dynamic port allocation for containers as well?