linuxpodmanquadlet

rootless podman quadlet webserver not reachable from host


I'm experimenting with rootless podman quadlets and tried to run mediawiki with a mariadb database as a more complex scenario. But I'm stuck as I'm unable to reach either the DB or mediawiki webserver (apache2). I started it with systemctl --user start mediawiki-pod.service after I ran systemctl --user daemon-reload.

When I start everything with podman run (e.g. podman run -p 8080:80 docker.io/mediawiki:1.42) or run it without pod file with each service using Network=host. I can reach the webserver/db.

I guess it has to do something with the bridged network, but I'm unable to find out what exactly. What is the problem with my quadlets?

mediawiki.pod

[Pod]
PodName=Mediawiki
Network=mediawiki.network
PublishPort=8080:80
PublishPort=3306:3306

mediawiki-app.container

[Container]
Image=docker.io/mediawiki:1.42
ContainerName=mediawiki-app
Pod=mediawiki.pod
Network=mediawiki.network

mediawiki-db.container

[Container]
Image=docker.io/mariadb:11.6
ContainerName=mediawiki-db
Pod=mediawiki.pod
EnvironmentFile=mediawiki-db.env
Network=mediawiki.network

mediawiki.network

[Network]
Driver=bridge

Edit: -I tried communication between containers and it works. So something is off with only container <-> host communication.


Solution

  • ok the solution was to remove the network from all containers and let the pod handle everything.

    mediawiki.pod

    [Pod]
    PodName=Mediawiki
    Network=mediawiki.network
    PublishPort=8080:80
    PublishPort=3306:3306
    

    mediawiki-app.container

    [Container]
    Image=docker.io/mediawiki:1.42
    ContainerName=mediawiki-app
    Pod=mediawiki.pod
    

    mediawiki-db.container

    [Container]
    Image=docker.io/mariadb:11.6
    ContainerName=mediawiki-db
    Pod=mediawiki.pod
    EnvironmentFile=mediawiki-db.env
    

    mediawiki.network

    [Network]
    Driver=bridge