-
Notifications
You must be signed in to change notification settings - Fork 539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolve the correct container runtime and chose appropriate host name #2639
Comments
@danegsta Is there a way to query the container runtime from dcp? Seems like we should be using host.containers.internal for podman. We have a configurated based override in other places but it seems like these are hardcoded:
|
We'll need this exposed in the app model during lifecycle callbacks to allow other resources to do this too. |
@davidfowl we have this thing called DcpDependencyCheck that is run as part of DcpHostService startup. It gathers the information about container runtime. I am not sure if the result of the check is readily available to the callbacks, but it should be pretty easy to make it available. |
|
It’s not currently not those callbacks run a bit too early today. If we have the information then we can figure out how to make it work. |
We do provide the identified runtime from DCP as part of those dependency checks, but something to consider is that there are ways to bind a custom local machine address in a container if we wanted to make this work consistently across runtimes. |
I'm going to do a cheap fix for preview 4 to make this configurable. We have this same problem in other parts of the stack but it's centralized. I'm going to make this use the same logic. In preview 5, we can make it more automatic based on the container runtime. |
PR is up. It will still require manual work for preview4, we'll make it more automagic in p5. |
Lets' chat about doing this @danegsta |
I am a little surprised that |
@karolz-ms that PR adds |
When I tried to run
AddPostgres
withWithPgAdmin
as well asAddRedis
withWithRedisCommander
, nothing worked on Podman native.I struggled to find the root cause and finally found the problem when I ran:
Look at the
Host
, it still pointed tohost.docker.internal
although I run onPodman
. And the same thing happened toRedis
withRedisCommander
And I think this is a bug.OS: Windows 11
.NET 8.0.200
.NET Aspire version:
8.0.0-preview.4.24127.7+2cbacd4bf15147d0ce67e915f6932bffb3f7e720
Podman version:
4.9.0
/cc @davidfowl
The text was updated successfully, but these errors were encountered: