title: jupyterhub in docker container not able to connect to external directory
body: <p>I am setting up a jupyterhub for users in our group to be able to run scripts using our python package on common data without having to install the environment on their computers.
  The system is based on jupyterhub-deploy-docker (<a href="https://github.com/jupyterhub/jupyterhub-deploy-docker/" rel="nofollow noreferrer">https://github.com/jupyterhub/jupyterhub-deploy-docker/</a>) with the modifications for running on a localhost (<a href="https://github.com/PHI-Toolkit/jupyterhub-deploy-docker-localhost" rel="nofollow noreferrer">https://github.com/PHI-Toolkit/jupyterhub-deploy-docker-localhost</a>) which spawns Docker Containers with single user jupyter notebook instances from a dockerized jupyterhub. The idea is to mount a local host directory (or that of a data server) into the jupyterhub container and from there feed it through to the single user instances, to be used as notebook_dir. Then, ipynbs can access the data on the server and be saved there.</p>
  
  <p>The whole approach works well when not dockerized (for testing, authentifying with DummyAuthenticator and spawning with SimpleLocalProcessSpawner), but I can't get the docker containers to see the host directory.
  My approach is to additionally bind the path on the host machine and specify the used DOCKER_NOTEBOOK_DIR as a target.
  Therefore, in docker-compose.yml I alter the volumes section</p>
  
  <pre><code>volumes:
    # Bind Docker socket on the host so we can connect to the daemon from
    # within the container
    - "/var/run/docker.sock:/var/run/docker.sock:rw"
    # Bind Docker volume on host for JupyterHub database and cookie secrets
    - "data:${DATA_VOLUME_CONTAINER}"
    - "/path/on/host:${DOCKER_NOTEBOOK_DIR}"
  </code></pre>
  
  <p>this is used in jupyterhub_config.py as the notebook_dir of the spawner:</p>
  
  <pre><code>notebook_dir = os.environ.get('DOCKER_NOTEBOOK_DIR') or '/home/jovyan/work'
  c.DockerSpawner.notebook_dir = notebook_dir
  # c.DockerSpawner.volumes = {
  #     'jupyterhub-user-{username}': notebook_dir,
  #     'jupyter-shared': '/home/jovyan/work/shared/',
  #     'jupyter-geoserver': '/home/jovyan/work/geoserver',
  #     'jupyter-modules': '/home/jovyan/work/modules'
  #}
  c.DockerSpawner.volumes = { 'jupyter-serverdata': notebook_dir,
      'jupyter-shared': '/home/jovyan/work/shared/',
  }
  </code></pre>
  
  <p>I would think that then the ipython notebook should access the contents of /path/on/host, but I still get the same directories as in the standard configuration (with the same content, even though I removed the jupyterhub containers and images).
  As I suspect this is due to the DockerSpawner, I tried to use the SimpleLocalProcessSpawner, but still running jupyterhub in its docker container. However I couldn't get this to run (spawning results in error 500).</p>
  
  <p>Any help on how to feed an external path (host path) through a jupyterhub running in a docker container into a jupyter notebook instance would be greatly appreciated.</p>