Skip to content

Commit 1766748

Browse files
authored
Merge pull request #1464 from manics/push-always-build
Always call `ContainerEngine.build()` when `push`ing
2 parents 32503ab + bc5704d commit 1766748

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

repo2docker/app.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,10 @@ def build(self):
733733
try:
734734
self.fetch(self.repo, self.ref, checkout_path)
735735

736-
if self.find_image():
736+
if self.find_image() and not self.push:
737+
# If push is requested we don't have a general way to query the registry.
738+
# ContainerEngine.build() also handles pushing, so always "build" and
739+
# rely on the implementation to decide whether to rebuild.
737740
self.log.info(
738741
f"Reusing existing image ({self.output_image_spec}), not building."
739742
)

0 commit comments

Comments
 (0)