Skip to main content

compose2pod

PyPI version Supported Python versions Downloads Coverage CI License GitHub stars Context7 uv Ruff ty

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 over 127.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 run directly, so depends_on: service_healthy works 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: image/build, command, environment/env_file, short-form bind volumes, healthcheck (CMD/CMD-SHELL), depends_on (all conditions), and network aliases. 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.

Status

Beta. Part of the modern-python family. MIT licensed.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

compose2pod-0.1.8.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

compose2pod-0.1.8-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file compose2pod-0.1.8.tar.gz.

File metadata

  • Download URL: compose2pod-0.1.8.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","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

Hashes for compose2pod-0.1.8.tar.gz
Algorithm Hash digest
SHA256 39e12f76efcc22093becee74be09d5f5d24c1e03efceb3adc8293cb077109b65
MD5 1b496b181b2c8292c9b00de017bdba95
BLAKE2b-256 5bcba1c7c1ebea8801ee2a9c747d337dca119b2a8b64d198af5f9e3f283145c1

See more details on using hashes here.

File details

Details for the file compose2pod-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: compose2pod-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","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

Hashes for compose2pod-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 cf948a92c85d4d4d7915ba2cf07abba9165166c83fc5fc2327a06bc30758a59c
MD5 b3a684adf3e8657d777b2af15cd6a32d
BLAKE2b-256 1ff3a6c5927477a880e7f33cb37cc9e40e1219a332c0ec952d193f65988d8894

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page