0

I am running a RHEL 9.0 compatible OS in my homelab, along with podman version 4.0.2 and podman-compose version 1.0.3. If you need any other information please let me know!

I'm trying to transition from using docker containers to rootless podman containers. To that end, I've brought over a pretty simple set of services that will run on a freshly installed docker setup on nearly any *nix OS I've tried. Simple right? Nope

First, I had to provide full pathing to my container images, can just refer to them as they appear in the docker library. That wasn't so bad.

My compose file declares a bridged network, and each service attaches to that network.

Any other computer on the network can reach any service whose ports are exposed from the container. Ports 8080, 8443, 3306, are all reachable from my laptop.

The problem lies in the inability for containers to communicate with each other. With docker networks, the containers could resolve one another using just the container name as the host name. I've installed ping on each of my containers and am finding that they can all ping themselves when referring to their own container name, but are unable to ping other container. That really puts a damper on my plans for rootless container.

In my compose file, I'm declaring the network first:

version: 3.1

networks:
  neta:
    driver: bridge

Each service declares a container name and attaches to that network, example:

    container_name: httpd
    networks:
      - neta
...
    container_name: mariadb
    networks:
      - neta

I didn't post my full compose file, because I believe this issue isn't specific to my file, but rather with rootless nature of podman.

My issue is that httpd container can't reach mariadb, nor the other way around.

I'm less that 24 hours into my podman journey, really, less than 4 hours. I just assumed that container networking would be something that would "just work" and am now mistaken.

Any input, links or advice would be appreciated.

Thanks

Lucas Krupinski
  • 682
  • 5
  • 16
  • SO is a programming Q&A platform and this question is not about programming. Questions about operating systems, their utilities, networking and hardware, are off topic here. [What topics can I ask about here?](https://stackoverflow.com/help/on-topic). Please delete this and ask, instead, on [Unix & Linux Stack Exchange](https://unix.stackexchange.com/) – Rob Nov 25 '22 at 00:05

0 Answers0