Fixed port assignment and persistent container networking with .NET Aspire and Podman #10431
Unanswered
jroellinger
asked this question in
Q&A
Replies: 2 comments 1 reply
-
cc @danegsta |
Beta Was this translation helpful? Give feedback.
0 replies
-
We’ve made some changes in the upcoming 9.4 release to use a persistent network if there are any persistent container resources. This will allow your persistent containers to continue communicating with each other when the app host isn’t running. We don’t currently support connecting containers to custom networks at resource startup, but it’s something we’ve discussed supporting with a proper API in the future. For now you should be able to connect your containers to an additional network once they’re running. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone! I'm experiencing networking issues with .NET Aspire - likely due to a configuration problem on my part.
Environment :
.NET Aspire: Latest version
Container Runtime: Podman Desktop
Problem Description
I'm trying to maintain network connectivity between containers when Aspire orchestration stops, but containers lose the ability to communicate with each other.
Current Behavior
When I stop the Aspire orchestration:
PostgreSQL container continues running (as expected with ContainerLifetime.Persistent)
PgWeb and PgAdmin containers also continue running
PgWeb and PgAdmin lose connectivity to PostgreSQL and show connection errors
External tools (DataGrip) can still connect to PostgreSQL via localhost:32774
This suggests the database is working fine, but container-to-container networking breaks when Aspire stops managing the network.
Error Details
PgWeb/PgAdmin containers show this error when trying to connect:
dial tcp: lookup postgres on [::1]:53: read udp [::1]:53: read: connection refused
The containers appear to lose their ability to resolve each other's hostnames when Aspire's network management stops.
Additional Issue: Custom Networks
When I try to use custom networks with WithContainerRuntimeArgs("--network", "custom-network"), I get:
Error response from daemon: container create: unable to find network with name or ID bridge: network not found
Beta Was this translation helpful? Give feedback.
All reactions