You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've run into some user confusion with regards to networking behavior with persistent containers. There's an existing section on configuring networking for container ports, but we'd like to be able to point people to best practices when a container is configured with a persistent lifetime (it will persist between App Host runs). At a basic level, something like this for guidance:
When a container is configured with a persistent lifetime, we recommend configuring the resource endpoints with a fixed unproxied host port. This will ensure that your persistent container endpoints can be accessed whether or not your App Host project is running. For example:
This will expose a TCP port 11400 on the host bound to port 11434 in the ollama container resource. Because ollama has a persistent lifetime, the container will continue running between starts and stops of the App Host project and will still be reachable via port 11400.
Type of issue
Missing information
Description
We've run into some user confusion with regards to networking behavior with persistent containers. There's an existing section on configuring networking for container ports, but we'd like to be able to point people to best practices when a container is configured with a persistent lifetime (it will persist between App Host runs). At a basic level, something like this for guidance:
When a container is configured with a persistent lifetime, we recommend configuring the resource endpoints with a fixed unproxied host port. This will ensure that your persistent container endpoints can be accessed whether or not your App Host project is running. For example:
This will expose a TCP port 11400 on the host bound to port 11434 in the
ollama
container resource. Becauseollama
has a persistent lifetime, the container will continue running between starts and stops of the App Host project and will still be reachable via port 11400.Page URL
https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/networking-overview#container-ports
Content source URL
https://github.com/dotnet/docs-aspire/blob/main/docs/fundamentals/networking-overview.md
Document Version Independent Id
28b9fa36-8d97-7637-cee2-3971d24c2333
Article author
@IEvangelist
Related Issues
The text was updated successfully, but these errors were encountered: