Public API for resolving the internal Docker hostname
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Is your feature request related to a problem? Please describe the problem.
I'm working on developing an Aspire provider for Couchbase, and to initialize a Couchbase cluster it's important to configure each container's DNS name so they can cross-talk between nodes. For this purpose, I need the internal docker host name, i.e. `couchbase-0.dev.internal`. So far, the only way I have found to resolve the hostname is by injecting it into an environment variable. Any attempt to resolve it via endpoints and passing the NetworkIdentifier just hangs waiting for the endpoint to be allocated.
The relevant code is here: https://github.com/dotnet/aspire/blob/c3565cac4f4bcc763ff4351b5173f76d4e31e8db/src/Aspire.Hosting/ApplicationModel/ExpressionResolver.cs#L23
However, I cannot find any publicly accessible code path that reaches this. The only path I've found is the environment variable resolution path.
### Describe the solution you'd like
A public API that can perform the more complete and complex ReferenceExpression resolution that is used by environment variables, rather than the more limited GetValueAsync path that hangs.
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.