Create a Docker image containing the software you want to use, which needs to have some requirements (later)
Give the image a unique tag and upload it to DockerHub
Create a GitHub repository containing your Jupyter notebooks and a small Dockerfile pointing to the main image
FROM ubuntu:bionic
RUN apt-get update && apt-get install -y python
RUN apt-get install -y python-pip
RUN pip install notebook
If you want to have JupyterLab available, install it via
RUN pip install jupyterlab_launcher jupyterlab traitlets ipython
RUN jupyter serverextension enable --py jupyterlab --user
ENV NB_USER gap
ENV NB_UID 1000
ENV HOME /home/${NB_USER}
RUN adduser --disabled-password --gecos "Default user" \
--uid ${NB_UID} ${NB_USER}
It is not necessary to use variables, but they will reappear later.
$ docker build --tag="sebasguts/mybinderbase:20180604" .
$ docker push sebasguts/mybinderbase:20180604
You can use any tag except latest.
FROM sebasguts/mybinderbase:20180604
COPY . ${HOME}
USER root
RUN chown -R ${NB_UID} ${HOME}
USER ${NB_USER}
Afterwards, upload it to GitHub and run it with Binder!
[![Binder](https://mybinder.org/badge.svg)]
(https://mybinder.org/v2/gh/github-username/repository-name/master)