From bc5704d73873827a63797681daf3e7b40ef4ea51 Mon Sep 17 00:00:00 2001 From: Simon Li Date: Mon, 1 Sep 2025 12:24:54 +0100 Subject: [PATCH] Always call `ContainerEngine.build()` when `push`ing This is so that if the image is built but not pushed it will still be pushed --- repo2docker/app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/repo2docker/app.py b/repo2docker/app.py index b9684c11..7a70a470 100755 --- a/repo2docker/app.py +++ b/repo2docker/app.py @@ -733,7 +733,10 @@ class Repo2Docker(Application): try: self.fetch(self.repo, self.ref, checkout_path) - if self.find_image(): + if self.find_image() and not self.push: + # If push is requested we don't have a general way to query the registry. + # ContainerEngine.build() also handles pushing, so always "build" and + # rely on the implementation to decide whether to rebuild. self.log.info( f"Reusing existing image ({self.output_image_spec}), not building." )