Run a standalone BinderHub in Docker.
This requires Docker-in-Docker so repo2docker and DockerSpawner can work.
docker build -t binderhub .
Replace <DOCKER-HOST-EXTERNAL-IP>
with the IP of the Docker host that will be used to access BinderHub.
docker run -it --name binderhub \
-v /var/run/docker.sock:/var/run/docker.sock \
-p 8000:8000 \
-e JUPYTERHUB_EXTERNAL_URL=http://<DOCKER-HOST-EXTERNAL-IP>:8000/ \
binderhub
Go to http://<DOCKER-HOST-EXTERNAL-IP>:8000
to access BinderHub.