Dotnet Dev Certs host.docker.internal support #5221
Replies: 4 comments 11 replies
-
@maddymontaquila any chance someone from the team might have some insight here? |
Beta Was this translation helpful? Give feedback.
-
@DamianEdwards is your experiment with dev-cert and the one container maybe similar here? |
Beta Was this translation helpful? Give feedback.
-
The urgency of a solution to this problem is now apparent. I hope the team will take action asap, as this is a blocker for Aspire.NET adoption. I just hit this roadblock and I couldn't find any solution. Our product launch is fast approaching and we thought of testing finally not from our local computer but on Azure. I successfully published a .NET Minimal API with Aspire.NET Orchestrator Support to Azure Container App. I have setup the custom domain and added in SSL certificate. The endpoint is secured (see screenshot). But the app doesn't run due to dev cert issue (see screenshot). I tried using the console in the Azure container app so I can do 'dotnet dev-certs https --trust' or whatever works for Linux, but there's an error so I couldn't get in (see screenshot). Any solution to this? I just couldn't find an answer the past days. By the way, Aspire.NET is great!
|
Beta Was this translation helpful? Give feedback.
-
@DamianEdwards given this discussion seems to have turned into a troubleshooting thread, do we think this is worth entering an issue to sort out in a future Aspire release? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am creating my first Aspire resource using a container available on Docker hub. SSL development on local works great for all things running locally as dev certs if installed via dotnet CLI and trusted work for localhost. However, the container has its own trusted certificate authorities and its own isolated network (thus its own localhost). When it makes calls into OTLP (the dashboard) Aspire correctly gives it the host.docker.internal endpoint env var for the OTEL collector when the resource is defined as an IResourceWithEnvironment. Only one problem, the collector uses the dev certs which are only minted for localhost. Given the DNS is different SSL traffic is rejected.
I would like to propose dev certs mint a certificate for host.docker.internal and localhost to make this easier for developers. In addition, I think there is potential here for Aspire to maybe do some of the heavy lifting involved with mounting dev certs in a bind mount volume/updating the container's trusted certs by overriding the entrypoint, performing the update and ultimately launching the original entrypoint?
What are the team's/community's thoughts on this? The only other idea I have is baking my own docker image from the original docker hub image, but that seems a little heavy handed.
What can we do to make this experience better and assist with the local SSL based development experience?
Beta Was this translation helpful? Give feedback.
All reactions