On Wed, 2019-06-26 at 20:45 +0800, Christoffer Reijer wrote:
This seems like a pretty basic use case but I cannot seem to find out how to do this:
I want to create two containers, foo and bar, and have them talk to each other on ports that are not exposed to anything else. I used to do this by creating a docker network, my_network, that I attached my two containers to, and then I could access foo.my_network from the bar container. But how moving to RHEL 8 I have to port my code away from Docker and I can't figure out how to get my two containers to talk. It works fine on IP (10.88.0.10 and 10.88.0.11) but I would prefer to use the name since I don't trust the IP to be the same at every run.
Any ideas? _______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
The quickest idea I would be to throw both containers in a pod. That way, they are in the same network namespace and can talk to each other over localhost. No need to expose ports and the IP addresses are irrelevant.