Skip to content

Resolve the correct container runtime and chose appropriate host name #2639

@thangchung

Description

@thangchung

When I tried to run AddPostgres with WithPgAdmin as well as AddRedis with WithRedisCommander, nothing worked on Podman native.

I struggled to find the root cause and finally found the problem when I ran:

> podman ps
> podman exec -it <pg admin container id> sh
> cat servers.json
{"Servers":{"1":{"Name":"postgreSQL","Group":"Aspire instances","Host":"host.docker.internal","Port":5432,"Username":"postgres","SSLMode":"prefer","MaintenanceDB":"postgres","PasswordExecCommand":"echo \u0027<password>\u0027"}}} 

Look at the Host, it still pointed to host.docker.internal although I run on Podman. And the same thing happened to Redis with RedisCommander 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

Metadata

Metadata

Assignees

Labels

area-app-modelIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions