The podman compose command does not work on RHEL 9
podman compose up does nothing useful on RHEL 9Short answer
podman compose does not run Compose files itself. It is a thin wrapper around an external provider, either docker-compose or podman-compose, and fails when none is installed. Install one provider, and if both are present, set PODMAN_COMPOSE_PROVIDER to pick the one you want.
Fix it fast
1Find out which cause you have
Check which Compose providers exist on the machine.
podman --version command -v docker-compose podman-compose2Match what you see, then jump to its fix
What does the error look like?
podman compose up does nothing useful on RHEL 9podman compose is not found or fails to start a provider
Cause 1 of 2
No compose provider is installed
1Check
Podman's manual describes podman compose as a thin wrapper around an external compose provider such as docker-compose or podman-compose.
command -v docker-compose podman-compose2Fix
Install podman-compose. It needs Python 3.9 or newer, PyYAML and python-dotenv, and the install can be done with pip for the current user.
python3 --version
pip3 install --user podman-compose3Verify
Run the wrapper in a project that has a compose file.
podman-compose --version
podman compose versionConfirmed by github.com
Cause 2 of 2
A different provider than the one you want is picked up
1Check
If docker-compose is installed, it takes precedence over podman-compose, because it is the original implementation of the Compose specification.
command -v docker-compose podman-compose2Fix
Choose the provider with the PODMAN_COMPOSE_PROVIDER environment variable, or with compose_providers in the engine table of containers.conf.
export PODMAN_COMPOSE_PROVIDER=podman-compose
podman compose up -d3Verify
podman compose up now starts the services with the provider you set.
podman psConfirmed by docs.podman.io
How do I stop it coming back?
- Set PODMAN_COMPOSE_PROVIDER in your shell profile so the choice does not depend on what else is installed.
- Install one provider per machine and note it in the project's README.
- Check provider requirements (Python version, DNS backend) when moving a project to a new RHEL host.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Related fixes
Servers
Status code 460 on an AWS Application Load Balancer
elb_status_code 460 in ALB access logs
A 460 is generated by the load balancer, not by your app.
3 causes, each with a fixServers
Application Load Balancer returns 504 for requests to EC2 instances
HTTPCode_ELB_504_Count
A 504 from an Application Load Balancer means it could not get an answer from a target in time.
4 causes, each with a fixServers
apk cannot find py-pip in an Alpine Docker image
py-pip (no such package):
On current Alpine releases there is no package called py-pip.
2 causes, each with a fixServers
dnf cannot install MySQL on Amazon Linux 2023
dnf cannot find a mysql-server package on Amazon Linux 2023
Amazon Linux 2023 documents MariaDB, not MySQL, as its database server, with packages named mariadb105 and mariadb105-server.
3 causes, each with a fixServers
ng serve runs in the container but localhost:4200 does not open
The browser cannot open localhost:4200 although ng serve is running in the container
ng serve listens on localhost by default, which inside a container is the container itself.
3 causes, each with a fixServers
Angular routes return 404 from nginx when you refresh or open a link
The home page loads, but refreshing /some/route shows an nginx 404
Angular routes like /users/42 are not files, so nginx looks for them on disk and returns 404.
3 causes, each with a fix