# Like Binder, but for generic Docker repos

**URL:** <https://discourse.jupyter.org/t/like-binder-but-for-generic-docker-repos/11262>\
**Category:** Binder\
**Created:** [October 15, 2021, 10:13am UTC](https://discourse.jupyter.org/t/like-binder-but-for-generic-docker-repos/11262 "2021-10-15T10:13:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mibieri](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/mibieri/32/5473_2.png) [@mibieri](https://discourse.jupyter.org/u/mibieri)\
**Post date:** [October 15, 2021, 10:13am UTC](https://discourse.jupyter.org/t/like-binder-but-for-generic-docker-repos/11262/1 "2021-10-15T10:13:15Z")

</div>

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](https://forums.docker.com/t/quickest-way-to-deploy-a-docker-container-directly-from-a-repository/116460)

---

<div class="post-metadata">

**Author:** ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)\
**Post date:** [October 15, 2021, 10:59am UTC](https://discourse.jupyter.org/t/like-binder-but-for-generic-docker-repos/11262/2 "2021-10-15T10:59:55Z")

</div>

BinderHub is a wrapper around [repo2docker](https://repo2docker.readthedocs.io/), 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](http://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](https://www.docker.com/blog/changes-to-docker-hub-autobuilds/). 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.

---

<div class="post-metadata">

**Author:** ![bollwyvl](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/bollwyvl/32/904_2.png) [@bollwyvl](https://discourse.jupyter.org/u/bollwyvl)\
**Post date:** [October 15, 2021, 2:32pm UTC](https://discourse.jupyter.org/t/like-binder-but-for-generic-docker-repos/11262/3 "2021-10-15T14:32:07Z")

</div>

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](https://repo2docker.readthedocs.io/en/latest/config_files.html#dockerfile-advanced-environments) [approach](https://mybinder.readthedocs.io/en/latest/tutorials/dockerfile.html), 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
