Skip to content
Search Fedora

    Browse this documentation

    From docker compose to podman-compose: the compatibility layer, measured

    Projects with an existing docker-compose.yml do not need a rewrite to move to Podman — the compatibility layer measured fine, with a few behavioural differences worth knowing.

    Terminal window
    sudo dnf install -y podman-compose

    Measured version 1.6.0 (Python implementation, reads standard compose files).

    Optional: make the docker command itself work:

    Terminal window
    sudo dnf install -y podman-docker # provides /usr/bin/docker forwarding to podman

    /tmp/dc/docker-compose.yml:

    services:
    web:
    image: docker.io/library/nginx:alpine
    ports:
    - "18080:80"
    Terminal window
    cd /tmp/dc
    podman-compose up -d
    curl -s -o /dev/null -w "%{http_code}\n" http://127.0.0.1:18080/

    Measured: 200. Container and network both created:

    Terminal window
    podman ps --format "{{.Names}}" # dc_web_1
    podman network ls | grep dc_default

    Naming matches docker compose: <project>_<service>_<index>.

    Terminal window
    podman-compose down

    Measured: down removes containers and networks, and the port is released (subsequent curl reads 000).

    DifferenceDocker Composepodman-compose 1.6.0
    rootlessneeds rootless docker setupnative
    networkscreates a bridge, containers ping by namealso created, but DNS behaviour occasionally differs
    depends_onsupports healthcheck-gated waitsstart order only, no health waiting
    build: contextBuildKitruns podman build; caches are not shared with BuildKit
    deploy.*swarm fields ignoredsome fields error out
    systemd integrationnonequadlet is the idiomatic alternative

    The idiomatic Fedora answer is quadlet (/etc/containers/systemd/*.container), promoting containers to first-class systemd services:

    • boot start, dependencies, and logs all under journald
    • systemctl status shows container state directly
    • see the Quadlet section of Podman in practice

    For simple stacks (one redis, one app) quadlet is cleaner; for legacy projects with large compose files, podman-compose is the lowest-cost bridge.

    SymptomCause
    image pull slow/failingno registry mirror configured, see Podman registries.conf
    docker command missinginstall the podman-docker shim
    healthcheck dependency ignoredpodman-compose does not wait; use quadlet or accept ordering
    port bind Permission deniedbinding a port below 1024 rootless; use a high port or raise net.ipv4.ip_unprivileged_port_start
    volume ownership messrootless + SELinux: append :Z to volume mounts
    port still bound after downa container with a restart policy self-healed; find it via podman ps