I would like to give users ssh access to their notebook servers. We are running jupyterhub in docker in the configuration in which the hub sits behind a traefik reverse-proxy, and user notebook servers are spawned using DockerSpawner.
I think I know what needs to be done at a conceptual level: traefik should forward a user specific port to the user container which should be listening on a specific port. I’m just not sure how the port allocation/discovery process would work.
Is there an example that is close to this, in which the spawner relates some information both to the reverse proxy and to the spawned container during the spawning process? I’m not averse to creating my own spawner class if necessary.
Thank you for any help or suggestions,
Matt