Sample Header Ad - 728x90

Podman and Docker: Sharing a network and/or hostname resolution between services?

0 votes
1 answer
1451 views
So I have a docker network named home that all of my root-based (or docker containers that were simply too hard to port to podman) containers live. sudo docker network ls NETWORK ID NAME DRIVER SCOPE 9d5788b45048 bridge bridge local b1f4756feab4 home bridge local 5d7ee6579f19 host host local 8678a773e2f2 none null local And, for podman, I have a very similar configuration. podman network ls NETWORK ID NAME DRIVER 8b17ae3d5d67 home bridge 2f259bab93aa podman bridge The problem? Well, it turns out that my name resolution for containers doesn't work within one network to another. So, for example, I have nginx-proxy-manager running on podman and I want to redirect http://domain/freshrss to the freshrss service by specifying freshrss and the associated port number. This doesn't work, and that makes sense to me as the docker network and the podman network are fundamentally *detached* from one another. So my question is simple: Is there some way to **treat these two networks as *one* network by bridging them together without hurting the sanctity of individualized network configurations**? Alternatively, is there *some way* for me to get around this communication issue without having to respecify the domain name in the forward name and port? For example, I thought forwarding to 127.0.0.1: would work as it would go to the host, and then connect to the appropriate port but that didn't work. docker/podman compose tailored answers are welcome as that's how I'm configuring my services.
Asked by TheYokai (143 rep)
Nov 22, 2024, 09:38 PM
Last activity: Nov 22, 2024, 09:59 PM