Open biqas opened 8 months ago
This isn't possible today. The only feature we have today around localhost mapping is when the containers need to access resources on the host, we have a setting that replaces localhost with host.docker.internal (which is configurable).
This is similar but because your container host is running remotely. We'd need another setting for host -> container host.
Tangentially related to https://github.com/dotnet/aspire/issues/2639
Would it make sense then to introduce a broader concept here, which can be also leveraged by other future tools.
The concept would be to put resources into groups or so called "containers" (not docker containers or K8s). and a group or "container" can have associations to localhost, remote machines, Docker, Podman K8s or things like that. In future may be web assembly containers. This could also help to generate out manifests to support multi cloud deployments or not?
In my case i have already a small multi machine setup ;)
Sounds great for the future, the only problem is that it would be in the far future 😅 as this is not the 90% case (AFAIK). Having given this more thought, by default when you add endpoints to containers thy go through our proxy. Even if the container is on a remote host the proxy is local.
cc @karolz-ms for ideas on short term and long term solutions
@davidfowl I have already tried those things:
appconfig:
"AppHost": { "ContainerHostName": "bits.fedora" }
using this package: <PackageReference Include="Aspire.Hosting" Version="8.0.0-preview.5.24161.15" />
and it does not work the proxy somehow is not routing properly, i guess.
@biqas can you tell me what is shown in the ports section of an inspected container when you run podman container inspect
from your Windows VM on some container with mapped ports?
I am thinking this may be as simple as a bug in the Aspire orchestrator in the sense that it assumes containers will always be exposed via one of the loopback interfaces when configuring proxies.
Hello,
I have finally tried aspire, was hard to setup in my case because I am developing on an Apple Silicon (M1) and using Parallels Windows ARM for Visual Studio and Linux (Fedora) for Podman.
And The problem I have is I have setup on mac in etc/host the DNS for Fedora Linux so I can access in the Windows VM the Podman containers via DNS. On command line everything is fine, and the environment works fine.
I have not found any possibility to map in Aspire
localhost
tofedora.podman
for resource like Postgres (which is running as a container in fedora Linux as a Podman container) or any other resource.What i try to do is something like this:
this results in that the connection string is like this:
Server=localhost;Port=5432;Database=db.a;User ID=XXX;Password='XXX'
I need to override for this resource to not use
localhost
but insteadfedora.podman
.Is this missing or not supported?