Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalize the extension / repo #25

Open
rokroskar opened this issue Nov 16, 2020 · 4 comments
Open

Generalize the extension / repo #25

rokroskar opened this issue Nov 16, 2020 · 4 comments

Comments

@rokroskar
Copy link

This repo is constructed to work with repo2docker which is great and fulfills the original purpose of spinning up VSCode on Binder. Would it be useful to provide a more general Dockerfile based on jupyter/base-notebook for those who don't use repo2docker and/or binder but do use the Jupyter stack in their docker images?

@manics
Copy link

manics commented Nov 16, 2020

You might find this discussion on zero-to-jupyterhub useful, it includes a Dockerfile:
jupyterhub/zero-to-jupyterhub-k8s#1902

@rokroskar
Copy link
Author

Indeed thanks for the pointer @manics - looking quickly at that PR it seems that all that is needed for what they're describing is exactly this type of minimal Dockerfile that just adds code to the base jupyter image. Doesn't require any changes to JH at all and if you give the users the choice of default starting URL they can just launch straight into VSCode. Anyway, I'll read the rest of that thread and add comments there :)

@rokroskar
Copy link
Author

rokroskar commented Nov 16, 2020

Here's a Dockerfile that works:

FROM jupyter/base-notebook

USER root
RUN apt-get update -y && \
    apt-get install -y git && \
    wget https://github.com/cdr/code-server/releases/download/v3.6.2/code-server_3.6.2_amd64.deb && \
    dpkg -i ./code-server*.deb && \
    rm code-server_3.6.2_amd64.deb && \
    apt-get clean

USER $NB_USER
RUN pip install git+https://github.com/betatim/vscode-binder && \
    jupyter serverextension enable --py jupyter_server_proxy && \
    jupyter labextension install --no-build @jupyterlab/server-proxy && \
    jupyter lab build && \
    npm cache clean --force && \
    rm -rf /home/${NB_USER}/.cache && \
    code-server --install-extension ms-python.python

I'd be happy to make a PR that adds this is a documentation of sorts but I'm not sure where it should go.

@manics
Copy link

manics commented Nov 16, 2020

See what @betatim thinks regarding how he wants to manage this repo, but one option could be to create your own repo, setup an automated build on Docker Hub (or some other system) and link to it from the README?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants