{"id":15161771,"url":"https://github.com/seamapi/precompose","last_synced_at":"2025-09-30T15:31:06.615Z","repository":{"id":48049672,"uuid":"349205836","full_name":"seamapi/precompose","owner":"seamapi","description":"Import a Compose application into an OSTree repository","archived":true,"fork":false,"pushed_at":"2021-08-09T22:23:37.000Z","size":64,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-09-17T17:52:33.062Z","etag":null,"topics":["compose","docker-compose","ostree","podman"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seamapi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-18T20:16:36.000Z","updated_at":"2023-01-28T03:17:56.000Z","dependencies_parsed_at":"2022-08-12T17:30:56.654Z","dependency_job_id":null,"html_url":"https://github.com/seamapi/precompose","commit_stats":null,"previous_names":["hello-seam/precompose"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/seamapi/precompose","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamapi%2Fprecompose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamapi%2Fprecompose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamapi%2Fprecompose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamapi%2Fprecompose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seamapi","download_url":"https://codeload.github.com/seamapi/precompose/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamapi%2Fprecompose/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277712282,"owners_count":25864331,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-30T02:00:09.208Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compose","docker-compose","ostree","podman"],"created_at":"2024-09-27T00:44:51.391Z","updated_at":"2025-09-30T15:31:06.353Z","avatar_url":"https://github.com/seamapi.png","language":"Python","readme":"# precompose\n\n`precompose` is a tool to import a [Compose](https://www.compose-spec.io/) application into an [OSTree](https://ostreedev.github.io/ostree/introduction/) repository.\n\nDistributing container images through an OSTree repository has some advantages, compared to the use of a container registry:\n\n- Images are deduplicated at the file level with OSTree, instead of at the layer level.\n- If your host is also managed by OSTree and is based on the same OS as your containers, then images are also deduplicated at the file level against the host.\n- Updates are done at the file level, instead of at the layer level - this can save significant amounts of bandwidth when only one or a few files in a layer have changed.\n\n`precompose` produces an OSTree commit which contains:\n\n- Your original `docker-compose.yml`, rewritten to pin each image to a specific SHA\n- A directory containing exploded copies of all the containers your application needs, which can be used as an [additional image store](https://www.redhat.com/sysadmin/image-stores-podman) with [Podman](https://podmain.io)\n\n## Requirements\n\nIn addition to the Python modules that it requires, `precompose` also needs some external tools to do its work:\n\n### [Docker Compose](https://github.com/docker/compose)\n\nWhile `docker-compose` can be installed from PyPI, `precompose` only uses it as an external tool, since it does not have a stable API. Because it is not used as a library, and because you may have obtained `docker-compose` from a place other than PyPI, it is not declared as a Python dependency of this module. It is used to preprocess the Compose file and interpolate any environment variables that may be present in the image name.\n\n`docker-compose` is also needed to run an application packaged with `precompose`.\n\n### [OSTree](https://github.com/ostreedev/ostree)\n\n`precompose` shells out to the `ostree` command-line tool in order to create its commits.\n\n### [Podman](https://github.com/containers/podman)\n\n`precompose` shells out to `podman unshare` to simulate being root and to `podman pull --root` to pull container images.\n\nYour system must be configured in a way that `podman` can operate without root privileges (aka \"rootless containers\") - on most Debian and Ubuntu based systems, installing the `uidmap` package along with Podman should be enough. Your mileage may vary.\n\n`podman` is also needed to run an application packaged with `precompose`, since Docker does not have anything equivalent to an additional image store. It is strongly recommended to use version 3.0 or later of Podman; the APIs used by `docker-compose` are incomplete in earlier versions.\n\n## Installation\n\nInstall using pip:\n\n```bash\npip3 install precompose\n```\n\n...or, grab the latest release from [GitHub](https://github.com/hello-seam/precompose/releases) or [PyPI](https://pypi.org/project/precompose/) and install it manually.\n\n## Usage\n\n```\nprecompose [-h] [--repo OSTREE] [--sign-by KEYID] [--arch ARCH] [--variant VARIANT] BRANCH COMPOSE\n\nImport a Docker Compose application into ostree\n\npositional arguments:\n  BRANCH             ostree branch to commit to\n  COMPOSE            path to docker-compose.yml\n\noptional arguments:\n  -h, --help         show this help message and exit\n  --repo OSTREE      ostree repo to import to\n  --sign-by KEYID    sign commit with GPG key\n  --arch ARCH        architecture to import\n  --variant VARIANT  variant to import\n```\n\n## Utilities\n\n`precompose_utils` (on [GitHub](https://github.com/hello-seam/precompose_utils) and [PyPI](https://pypi.org/project/precompose-utils/)) contains a set of utilties for working with applications that have been packaged with `precompose`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseamapi%2Fprecompose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseamapi%2Fprecompose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseamapi%2Fprecompose/lists"}