Like Binder, but for generic Docker repos

Thanks to Binder, we can now deploy Jupyter notebooks with basically one click. I like this, because people interested in my repos have to spend zero effort to try them out. For generic Docker images, unrelated to Jupyter, this is not possible at the moment. So people still need to mess with git clone, docker build, docker run. For some users, this is already too much.

I wonder whether Binder plans to expand towards generic Docker images or whether there’s a similar service somewhere? (Didn’t find anything even though I researched pretty hard.)

I also asked a similar question here: Quickest way to deploy a Docker container directly from a repository - General Discussions - Docker Community Forums

BinderHub is a wrapper around repo2docker, so it’s not suitable for launching generic Docker images.

In theory it should be fairly simple to build your own service to build a single Docker image and launch it. There’s several problems to consider though, including:

  • abuse: mybinder.org has several restrictions included limited CPU but it still sees a lot of abuse from cryptominers. Docker Hub stopped their free autobuilds due to abuse. If you can run anything inside your container that allows people to run malicious servers. Requiring a login will help reduce this but increases the barrier to using the service, and still requires monitoring for abuse since it’s easy enough to create a throwaway account.
  • exposing ports: BinderHub proxies a single webservice on a predefined port under /arbitrary/prefix, which means only one public IP is needed. If you’re running arbitrary containers you’d need to deal with port forwarding. If you limit containers to running a single webservice that service still needs to be aware of /arbitrary/prefix which reduces the chance that an arbitrary container image will just work
  • security: Since the service is entirely public and for demo purposes you may decide this is acceptable, but if you’re exposing ports what’s to stop one user accessing another user’s application?

I could see this working within a trusted community though, for example in a workplace or institution.

2 Likes

If docker pull and docker run is too much, then “do something with a running arbitrary container in the cloud” would still be a barrier to user success.

It seems the Dockerfile approach, with a custom FROM to the arbitrary container that layers in “the binder contract”

  • an appropriate user experience
  • accessible from a single port

the rstudio, theia and other examples out there show this is possible.

For example:

  • if demoing a REST API that exposes a swagger.json, perhaps just running an nginx proxy which layered in redoc or something would be a good experience
  • if demoing a simulation, maybe making/updating/serving a single image or video would be sufficient
1 Like