Podman Networking
Basics
- Pods or containers can have exposed ports.
- A pod is one "host" and all containers inside it act as having the same IP (there is one port 80 per pod) If a port is used no other container can use it
Inter Container Networking
- podman/basic_networking.md at main · containers/podman · GitHub
- Configuring container networking with Podman | Enable Sysadmin (redhat.com)
- Podman 4.0's new network stack: What you need to know | Enable Sysadmin (redhat.com)
- phpmyadmin - Is it possible to run two containers in same port in same pod by podman? - Stack Overflow
- DNS not working with containers on a single network. · Issue #11229 · containers/podman (github.com)
A Pod is a single host that contains services. It is like a tiny VM with one IP, a pod only has one of any port.
2 containers cannot both listen on 80 in one pod. This is clearly an issue, your options are to change the port used by one of the containers or run them in/not in the same pod.
When containers are in the same pod they can be addressed by localhost:PORT
but when in different pods (or not in pods) they need to be added to the same network and you need the podman-plugins
package installed to do pod/container name resolution.