Convert a Docker Compose file into a script that runs its services as a single Podman pod
Project description
compose2pod
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:
- No bridge networking / netavark. Unprivileged CI containers often have a read-only
/proc/sys, so netavark fails to create bridge networks. A single pod shares one network namespace with no bridge: services talk over127.0.0.1, and names resolve via--add-host. - No systemd. Podman healthchecks are normally scheduled by systemd timers. compose2pod gates startup by polling
podman healthcheck rundirectly, sodepends_on: service_healthyworks without systemd. - No heavy runtime. The core is stdlib-only — no dependencies, no compiled wheels — so it installs and runs in minimal Python images.
Install
pip install compose2pod # core: reads compose as JSON
pip install compose2pod[yaml] # optional: read YAML directly (adds PyYAML)
Usage
# 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.sh
Supported compose subset
compose2pod supports an honest subset and errors clearly on anything outside it. See the design spec for the full matrix: image/build, command, environment/env_file, short-form bind volumes, healthcheck (CMD/CMD-SHELL), depends_on (all conditions), and network aliases.
Status
Beta. Part of the modern-python family. MIT licensed.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file compose2pod-0.1.0.tar.gz.
File metadata
- Download URL: compose2pod-0.1.0.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddf009233330f683838957782ac59c3e4ef2add9d72563d46bb6da399930d6a8
|
|
| MD5 |
50ad54919491270e8a7e6b563e5d5b3a
|
|
| BLAKE2b-256 |
86cf876122bd90922ad978fc184215e8a2640b3e793a2de630e345698a3377dc
|
File details
Details for the file compose2pod-0.1.0-py3-none-any.whl.
File metadata
- Download URL: compose2pod-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28a026f2ee19fd8e55a80049056edcfbf2ac2ad42e678aa11bdf4a5fab8dd423
|
|
| MD5 |
954fec62072997117b6d1c80c9f240bc
|
|
| BLAKE2b-256 |
89c8079410498be9140de2ae964ecfb3e793a09ce71fb670f79c4807a4b00e9a
|