Description
Python wrapper to run Buildah from the shell, driven by the build manifest in a docker-compose.yml file.
Motivation
- You have a Docker project that contains:
docker-compose.yml— as the build manifest- one or more
Dockerfiles in the project
- You want to automate builds with the
buildahbuild system. buildahdoes not natively consumedocker-compose.ymlfor builds.
Requirements
- Linux with the
buildahbinary onPATH(invoked as a native host binary — there is no executor image to pull). - Python
>= 3.9.
How to
pip install buildah-wrapper
cd <...>/directory/containing/docker-and-docker-compose-file/
buildah-wrapper --build # build into the local store
buildah-wrapper --build --deploy # build, then push to the registry and mirrors
buildah-wrapper --deploy # push already-built images
buildah-wrapper --clean # remove all buildah containers and images
Running with no action prints the help screen.
Arguments
Actions are combinable (e.g. --build --deploy):
--build,-b— build images into the local store--deploy,-d— push built images to the registry and allx-mirrors--clean— remove all buildah containers and images
Options:
--compose-file FILE— path to thedocker-compose.ymlfile (default:docker-compose.yml)--squash/--no-squash— single-layer output for all services (default: off; per-servicex-squashoverrides it)--verbose,-V— verbose output (shortcut for--log-level DEBUG)--log-level LEVEL— override log level:DEBUG,INFO,WARNING,ERROR,CRITICAL--version,-v— show script, Python and buildah versions--help,-h— show the help message and exit
Supported features
1. Single project in docker-compose.yml
services:
app:
image: "epicmorg/buildah-wrapper:image"
build:
context: .
dockerfile: ./Dockerfile
2. Multi-project in docker-compose.yml
services:
app:
image: "epicmorg/buildah-wrapper:image-jdk11"
build:
context: .
app-develop:
image: "epicmorg/buildah-wrapper:image-develop-jdk11"
build:
context: .
dockerfile: ./Dockerfile.develop
app-develop-17:
image: "epicmorg/astralinux:image-develop-jdk17"
build:
context: .
dockerfile: ./Dockerfile.develop-17
3. Mirrors — x-mirrors
Add an x-mirrors list to a service to push the built image to additional
registries during --deploy. A failed push to any mirror fails the service.
services:
app:
image: docker.io/epicmorg/app:latest
build:
context: .
x-mirrors:
- quay.io/epicmorg/app:latest
- ghcr.io/epicmorg/app:latest
4. Squash — x-squash
Add an x-squash field to a service to control single-layer output per service.
Default is false. A per-service x-squash overrides the --squash / --no-squash
CLI default for that service.
services:
app:
image: docker.io/epicmorg/app:latest
build:
context: .
x-squash: true
Notes
buildah buildruns with--format docker(OCI format does not carryHEALTHCHECK).- Builds run sequentially, so
FROMchains (base -> runtime -> app) resolve in order. - Pushes use the default registry auth (
~/.config/containers/auth.jsonorREGISTRY_AUTH_FILE).
Metadata
Release files for buildah-wrapper 2.0.2.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| buildah_wrapper-2.0.2.6.tar.gz | 16.1 kB | Without provenance | Details for buildah_wrapper-2.0.2.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| buildah_wrapper-2.0.2.6-py3-none-any.whl | Python 3 | none | any | Details for buildah_wrapper-2.0.2.6-py3-none-any.whl |
Total release size: 34.0 kB
Release files / buildah_wrapper-2.0.2.6.tar.gz
| Download URL | buildah_wrapper-2.0.2.6.tar.gz |
|---|---|
| Size | 16.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
16e2632ede51a207e0bd4e346858ff3796fa9cd274cf0bcd5a9ec529e0515e1b
|
|
BLAKE2b-256 checksum How to use checksums |
21ca6bd63898e6a6269c8e9cd29fa94153b24ec202e39d90f3a6672874ff88fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / buildah_wrapper-2.0.2.6-py3-none-any.whl
| Download URL | buildah_wrapper-2.0.2.6-py3-none-any.whl |
|---|---|
| Size | 17.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ad226efd7025d9e64252089c8ad14938df628cc39a17a3717cffb00608fde4b
|
|
BLAKE2b-256 checksum How to use checksums |
37265ca24952e3a93fcfa50e86272e64f2cf87b6e671129eff831346539917bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for buildah-wrapper 2.0.2.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.