Your issues stem from going rootless. Podman Compose creates rootless containers and that may or may not be what you want. A lot more configuration needs to be done to get rootless containers working well for persistent services that use low ports, like enabling linger for specific users or enabling low ports for non-root users.
If you want the traditional Docker experience (which is rootful) and figure out the migration towards rootless later, I'd recommend the following:
- Install
podman-docker
. This provides a seamless Docker compatibility layer for podman, allowing you to even use regular docker commands that get translated behind the scenes into Podman. - Install regular
docker-compose
. This will work viapodman-docker
and gives you the native docker compose experience. - Enable
podman.socket
andpodman-restart.service
. First one socket-activates the central Podman daemon, second one restarts any podman containers with arestart-policy
ofalways
on boot. - Run your docker-compose commands using
sudo
, sosudo docker-compose up -d
etc. You can run this withsudo podman compose
as well if you're allergic to hyphenation. Podman allows both rootful and rootless containers and the way you choose is by running the commands withsudo
or not.
This gets you to a very Docker-like experience and is what I am currently using to host my services. I do plan on getting familiar with rootless and systemd services and Kubernetes files, but I honestly haven't had the time to figure all that out yet.