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.
Install
Section titled “Install”sudo dnf install -y podman-composeMeasured version 1.6.0 (Python implementation, reads standard compose files).
Optional: make the docker command itself work:
sudo dnf install -y podman-docker # provides /usr/bin/docker forwarding to podmanMeasured: starting nginx
Section titled “Measured: starting nginx”/tmp/dc/docker-compose.yml:
services: web: image: docker.io/library/nginx:alpine ports: - "18080:80"cd /tmp/dcpodman-compose up -dcurl -s -o /dev/null -w "%{http_code}\n" http://127.0.0.1:18080/Measured: 200. Container and network both created:
podman ps --format "{{.Names}}" # dc_web_1podman network ls | grep dc_defaultNaming matches docker compose: <project>_<service>_<index>.
podman-compose downMeasured: down removes containers and networks, and the port is released (subsequent curl reads 000).
Behaviour differences from Docker Compose
Section titled “Behaviour differences from Docker Compose”| Difference | Docker Compose | podman-compose 1.6.0 |
|---|---|---|
| rootless | needs rootless docker setup | native |
| networks | creates a bridge, containers ping by name | also created, but DNS behaviour occasionally differs |
depends_on | supports healthcheck-gated waits | start order only, no health waiting |
build: context | BuildKit | runs podman build; caches are not shared with BuildKit |
deploy.* | swarm fields ignored | some fields error out |
| systemd integration | none | quadlet is the idiomatic alternative |
When to skip compose and use quadlet
Section titled “When to skip compose and use quadlet”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 statusshows 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.
Common traps
Section titled “Common traps”| Symptom | Cause |
|---|---|
| image pull slow/failing | no registry mirror configured, see Podman registries.conf |
docker command missing | install the podman-docker shim |
| healthcheck dependency ignored | podman-compose does not wait; use quadlet or accept ordering |
| port bind Permission denied | binding a port below 1024 rootless; use a high port or raise net.ipv4.ip_unprivileged_port_start |
| volume ownership mess | rootless + SELinux: append :Z to volume mounts |
| port still bound after down | a container with a restart policy self-healed; find it via podman ps |
Related pages
Section titled “Related pages”- Podman in practice — rootless, Quadlet, registry mirrors
- Containerfile builds — compose build contexts
- Kubernetes — the next step past one machine
- Upstream: podman-compose