Skip to main content

A script to run docker-compose.yml using podman

Project description

Podman Compose

An implementation of Compose Spec with Podman backend. This project focus on:

  • rootless
  • daemon-less process model, we directly execute podman, no running daemon.

This project only depend on:

And it's formed as a single python file script that you can drop into your PATH and run.

References:

Alternatives

As in this article you can setup a podman.socket and use unmodified docker-compose that talks to that socket but in this case you lose the process-model (ex. docker-compose build will send a possibly large context tarball to the daemon)

For production-like single-machine containerized environment consider

For the real thing (multi-node clusters) check any production OpenShift/Kubernetes distribution like OKD.

Versions

If you have legacy version of podman (before 3.x) you might need to stick with legacy podman-compose 0.1.x branch. The legacy branch 0.1.x uses mappings and workarounds to compensate for rootless limitations.

Modern podman versions (>=3.4) do not have those limitations and thus you can use latest and stable 1.x branch.

Installation

Install latest stable version from PyPI:

pip3 install podman-compose

pass --user to install inside regular user home without being root.

Or latest development version from GitHub:

pip3 install https://github.com/containers/podman-compose/archive/devel.tar.gz

or

curl -o /usr/local/bin/podman-compose https://raw.githubusercontent.com/containers/podman-compose/devel/podman_compose.py
chmod +x /usr/local/bin/podman-compose

or inside your home

curl -o ~/.local/bin/podman-compose https://raw.githubusercontent.com/containers/podman-compose/devel/podman_compose.py
chmod +x ~/.local/bin/podman-compose

or install from Fedora (starting from f31) repositories:

sudo dnf install podman-compose

Basic Usage

We have included fully functional sample stacks inside examples/ directory.

A quick example would be

cd examples/busybox
podman-compose --help
podman-compose up --help
podman-compose up

A more rich example can be found in examples/awx3 which have

  • A Postgres Database
  • RabbitMQ server
  • MemCached server
  • a django web server
  • a django tasks

When testing the AWX3 example, if you got errors just wait for db migrations to end.

Tests

Inside tests/ directory we have many useless docker-compose stacks that are meant to test as much cases as we can to make sure we are compatible

Project details


Download files

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

Source Distribution

podman-compose-1.0.2.tar.gz (21.0 kB view details)

Uploaded Source

Built Distribution

podman_compose-1.0.2-py2.py3-none-any.whl (27.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file podman-compose-1.0.2.tar.gz.

File metadata

  • Download URL: podman-compose-1.0.2.tar.gz
  • Upload date:
  • Size: 21.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for podman-compose-1.0.2.tar.gz
Algorithm Hash digest
SHA256 457888687340f4aa745de62f2d4bc86c3b00a5614034c4e4a7dda4a6a1a5f097
MD5 44603bb298987bdcfe19efae6ad70cc1
BLAKE2b-256 5c86d59364ac51101c91f07fd8193331e5089aeed3649aa9c7599f4a8f1e0753

See more details on using hashes here.

File details

Details for the file podman_compose-1.0.2-py2.py3-none-any.whl.

File metadata

  • Download URL: podman_compose-1.0.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 27.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for podman_compose-1.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 729ca233c5cd672b7268edf2bdb20427dfcd0c3528e029cf606a4e09a5a457fc
MD5 959ff7be6c10fd305dde3d709c89f860
BLAKE2b-256 9ff32bb435ae09cf70aa5762a94dbdb58fa898bce0b6bbda48c4b9c38c4255de

See more details on using hashes here.

Supported by

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