-
Couldn't load subscription status.
- Fork 120
Description
Hi,
I am using podman‑py to automate the creation of multi‑architecture container images with podman.
My existing CLI workflow looks like this:
podman manifest create example:v1.2.3
podman build --manifest example:v1.2.3 --platform linux/amd64,linux/arm .When translating these commands into calls to podman-py, I've noticed that the --manifest argument is not supported by the client.images.build function.
I am aware that podman-py already supports creating manifests and adding images to them.
However, I am left wondering if supporting the --manifest would not give developers an experience closer to the existing podman CLI and thus simplify the creation of scripts, as the creation of manifests and addition of images could all be done in a single call.
My proposal, for the same example CLI workflow above, is to allow something like this:
# ...
with PodmanClient(base_url=uri) as client:
image, _ = client.images.build(
path=".",
dockerfile="Containerfile",
manifest="example:v1.2.3", # <-- here's the missing field - the manifest is created if it does not exist
platform=["linux/amd64", "linux/arm64"],
)Here, the new optional manifest kwarg would accept the name of the manifest and automatically add the newly built image(s) to it.
What are your opinions on this feature?
Thanks a lot for your attention and for the project!