| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Convert a Docker Compose file into a POSIX sh script that runs its services as a single Podman pod.
Built for CI and test environments where you can't use docker compose or podman kube play:
compose2pod's generated scripts own /etc/hosts: they write it to a temp file and bind-mount it read-only into every container under --no-hosts (see architecture/supported-subset.md), so pod-internal name resolution works on any Podman version. host.containers.internal / host.docker.internal are not provided — add an explicit extra_hosts entry if you need them.
pip install compose2pod # core: reads compose as JSON
pip install compose2pod[yaml] # optional: read YAML directly (adds PyYAML)# YAML directly (needs the [yaml] extra)
compose2pod docker-compose.yml --target app --image myimage:ci > run.sh
# Or stay dependency-free by piping JSON (e.g. via yq)
yq -o=json '.' docker-compose.yml | compose2pod --target app --image myimage:ci > run.sh
sh ./run.shcompose2pod refuses every document docker compose config refuses — a measured property, checked continuously by a differential conformance harness that runs the real Docker CLI and the real compose2pod pipeline over the same YAML. So a file that compiles is a file Docker would run; where compose2pod still refuses a form Docker accepts, it is because Podman genuinely cannot express it (each such case is documented, not guessed).
Within that boundary it covers most of what real compose files use:
Compose extension fields (any x--prefixed key) and YAML anchors are accepted as-is, so a top-level x-* anchor block for shared config just works. ${VAR}-style variable interpolation is left live in the generated script, resolved by its shell against the environment present when the script runs (no .env file support). See architecture/supported-subset.md for the full accept/ignore/reject matrix and planning/decisions/ for the boundary rulings.
Beta. Part of the modern-python family. MIT licensed.
| Back | FazBrowse Home | New Git URL |