Remove docker-pull hack
No longer check if image exists by doing a docker-pull -
binderhub will no longer start a build if it knows that
the image already exists
@@ -251,25 +251,14 @@ class Repo2Docker(Application):
s.close()
return port
- def image_exists(self):
- client = docker.from_env(version='auto')
- # HACK: Try to just pull this and see if that works.
- # if it does, then just bail.
- # WHAT WE REALLY WANT IS TO NOT DO ANY WORK IF THE IMAGE EXISTS
- try:
- image = client.images.pull(self.output_image_spec)
- return True
- except docker.errors.ImageNotFound:
- return False
-
def start(self):
- if not self.image_exists():
checkout_path = os.path.join(self.git_workdir, str(uuid.uuid4()))
self.fetch(
self.repo,
self.ref,
checkout_path
)
+
for bp_class in self.buildpacks:
bp = bp_class(parent=self, log=self.log, capture=self.json_logs)
if bp.detect(checkout_path):
@@ -288,6 +277,3 @@ class Repo2Docker(Application):
if self.run:
self.run_image()
-
-
-
