Avoiding image pushes


I’m fairly new to Binder, but it has been a really useful construct for us to launch and deploy our custom, Python-wrapped C++ application within a Jupyter-lab based environment.

I’m still in the prototyping phase - for now, we custom build the Docker image ourselves, push the image to DockerHub, then create a Dockerfile within the repository passed to mybinder that includes a single “FROM …” line to pull the image.

All of this works just fine. However, I notice that when it is not able to locate the docker image in its cache, it first ‘builds’ the image (again, albeit, faster), then it pushes the image, before pulling it and starting the image.

Is there a way to avoid the pushing and pulling parts? I tried putting the Dockerfile in a ‘binder/’ folder, but to no avail.

Thanks (and, thank you for an amazing product btw!)

mybinder.org is distributed over multiple Kubernetes clusters on different public cloud providers, each of which has its own registry for storing built container images. In addition some clusters have autoscaling which means nodes are created and destroyed depending on the number of users, so even if an image has been built in one cluster it may still be pulled into that particular node.

In general you’ll achieve better performance by using requirements/environment files instead of a Dockerfile. A Dockerfile is a low-level way of using mybinder so no optimisations can be done.