Problem
Testcontainers for Python currently assumes the configured container runtime is Docker. Running tests against a Podman daemon works partially but breaks in a few places:
DockerCompose shells out to docker compose, which fails on a pure-Podman host without the podman-docker shim package installed.
bind_ports parsing trips over Podman's protocol-suffixed published port format (e.g. "8080/tcp" vs Docker's "8080").
- Host port ranges in compose files (
published: "5000-5999") silently break tests because Podman doesn't support them.
- There is no way to programmatically tell whether the connected daemon is Podman, so adaptive behavior is impossible.
Other Testcontainers implementations already ship first-class Podman support:
Proposal
Bring Testcontainers for Python to feature parity with go/java for Podman: detect the runtime at the daemon level, transparently adapt the few code paths that differ (compose binary, port-binding parsing), keep the existing Docker behavior unchanged when Docker is in use, and document the supported setup alongside Docker.
Note: A PR implementing this will be opened shortly.
Problem
Testcontainers for Python currently assumes the configured container runtime is Docker. Running tests against a Podman daemon works partially but breaks in a few places:
DockerComposeshells out todocker compose, which fails on a pure-Podman host without thepodman-dockershim package installed.bind_portsparsing trips over Podman's protocol-suffixed published port format (e.g."8080/tcp"vs Docker's"8080").published: "5000-5999") silently break tests because Podman doesn't support them.Other Testcontainers implementations already ship first-class Podman support:
ProviderPodmanfor explicit network handling).DOCKER_HOSTsetup, rootless/rootful guidance).Proposal
Bring Testcontainers for Python to feature parity with go/java for Podman: detect the runtime at the daemon level, transparently adapt the few code paths that differ (compose binary, port-binding parsing), keep the existing Docker behavior unchanged when Docker is in use, and document the supported setup alongside Docker.