rocker-org / binder

Template for RStudio on Binder / JupyterHub
GNU General Public License v2.0
69 stars 32 forks source link

Binder + Jupyter Lab + SSL? #27

Closed vnijs closed 6 years ago

vnijs commented 6 years ago

Binder looks really interesting! Thanks for making this publicly available.

Question: Have you seen any docker files that use binder with Jupyter Lab? Question: Have you seen any docker files that use binder with Jupyter Lab + SSL?

The README.md at https://github.com/binder-examples/jupyterlab make it sound simple enough but ...

cboettig commented 6 years ago

I think jupyterlab works out of the box with the default binder images, but looks like we need to update this binder image to include lab. Currently only includes jupyterhub (via ?urlpath=tree) and rstudio (urlpath=rstudio).

@yuvipanda or @choldgraf can probably tell me what I need to update in this Dockerfile to pull in Juypter Lab, and can point you to the Dockerfile sources for the 'vanilla' binder. (This repo adds binder on top of the rocker stack, which is convenient for R / rocker users but inverted from the traditional binder stack).

choldgraf commented 6 years ago

hey @vnijs - I'd recommend checking out the Binder documentation at "docs.mybinder.org" or browsing through the example repositories in binder-examples as you mentioned in your comment. Binder treats Dockerfiles as an "advanced" use case and generally discourages them unless they really need to be used. If you have questions about this, come say hello in the gitter channel: https://gitter.im/jupyterhub/binder

vnijs commented 6 years ago

@cboettig Thanks for the clarification @choldgraf I'm pretty much tied to docker and looking for the easiest (secure) approach for remote access to the services running in the container. It seems jupyterhub / binder should fit the bill. I'll look at the documentation again and post any questions to the gitter channel. Thanks

cboettig commented 6 years ago

@vnijs Just a side note here, but if what you're after is mostly the SSL bit, I particularly like using Caddy server for this. You can get Caddy as a separate docker image and deploy it next to RStudio, Jupyter, or any other service pretty easily with the standard docker-compose strategy. Here's my typical Caddy + RStudio + SSL setup: https://github.com/boettiger-lab/servers/tree/master/rstudio (see the docker-compose.yml). (Caddy is basically a super-user-friendly version of nginx, which will automatically register and renew SSL certs for your domain via LetsEncrypt: https://caddyserver.com)

Binder really takes the opposite approach, as Chris described, of hiding/shielding you from any of the Docker stuff so everything just works like magic. And it is pretty magical. But if you just want SSL certs for containerized services on a server somewhere, I think something simpler like Caddy would be easiest. HTH!

choldgraf commented 6 years ago

FWIW, JupyterHub (which BinderHub uses under the hood) has a lot of customizable security features. It's a but unclear to me how to expose these features to users for their individual environments in Binder, I agree w @cboettig that you'd probably need to roll your own setup in that case (e.g. deploying your own BinderHub and customizing as you like instead of using mybinder.org, or just using a different containerized deployment approach).

(also, note that mybinder.org does use HTTPS everywhere...so your first point-of-contact with the JupyterHub uses HTTPS as well)

vnijs commented 6 years ago

@cboettig and @choldgraf: Thanks for the suggestions! I will look into these options in more detail asap.