Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Servers, nginx and Docker

The podman compose command does not work on RHEL 9

Errorpodman compose up does nothing useful on RHEL 9

Short 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.

  • Applies to Podman 5, RHEL 9, podman-compose 1.x
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Check which Compose providers exist on the machine.

    podman --version
    command -v docker-compose podman-compose
  2. 2Match what you see, then jump to its fix

    1. 1command -v prints nothing for both docker-compose and podman-composeNo compose provider is installedFix
    2. 2podman compose runs docker-compose behaviour and errors about a Docker socket or daemonA different provider than the one you want is picked upFix

What does the error look like?

  • podman compose up does nothing useful on RHEL 9
  • podman 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-compose

2Fix

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-compose

3Verify

Run the wrapper in a project that has a compose file.

podman-compose --version
podman compose version

Confirmed by github.com

Did this fix it?

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-compose

2Fix

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 -d

3Verify

podman compose up now starts the services with the provider you set.

podman ps

Confirmed by docs.podman.io

Did this fix it?

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

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 fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.