From abc08135ba54025d85b4fe5bac44183cb31e7a9f Mon Sep 17 00:00:00 2001 From: Andreas Kohn Date: Fri, 27 Nov 2020 12:00:34 +0100 Subject: [PATCH] Only pull each image once --- podman_compose.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/podman_compose.py b/podman_compose.py index 0f6d835..101d9da 100755 --- a/podman_compose.py +++ b/podman_compose.py @@ -1055,9 +1055,12 @@ def compose_version(compose, args): @cmd_run(podman_compose, 'pull', 'pull stack images') def compose_pull(compose, args): + images = set() for cnt in compose.containers: if cnt.get('build', None): continue - compose.podman.run(["pull", cnt["image"]], sleep=0) + images.add(cnt["image"]) + for image in images: + compose.podman.run(["pull", image], sleep=0) @cmd_run(podman_compose, 'push', 'push stack images') def compose_push(compose, args):