From 102ea67a6cd187278b3f2681ec8c19921143fd81 Mon Sep 17 00:00:00 2001 From: Milan Balazs Date: Fri, 2 Aug 2024 15:29:08 +0200 Subject: [PATCH] Make "images.push" method support "format" parameter Some repositories (AWS lambdas in ECR) have issues with the oci manifest format and require the manifest be pushed in the docker/v2s2 format. Signed-off-by: Milan Balazs --- podman/domain/images_manager.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/podman/domain/images_manager.py b/podman/domain/images_manager.py index 8cc3cdbe..51cbc14f 100644 --- a/podman/domain/images_manager.py +++ b/podman/domain/images_manager.py @@ -206,6 +206,8 @@ def push( destination (str): alternate destination for image. (Podman only) stream (bool): return output as blocking generator. Default: False. tlsVerify (bool): Require TLS verification. + format (str): Manifest type (oci, v2s1, or v2s2) to use when pushing an image. + Default is manifest type of source, with fallbacks. Raises: APIError: when service returns an error @@ -220,6 +222,7 @@ def push( params = { "destination": kwargs.get("destination"), "tlsVerify": kwargs.get("tlsVerify"), + "format": kwargs.get("format"), } name = f'{repository}:{tag}' if tag else repository