I am new to jupyterhub and have been trying to figure out a way to dynamically load the available images on host in the image selection dropdown.
The reason i want to do this is whenever a new image for jupyterlab is available, the jupyterhub_config.py needs to be updated and then jupyterhub is restarted to load that image. I am looking for an elegant solution to fix that.
What i could think of was somehow loading the images on host and then re-run the jupyterhub_config.py file within contianer.
c.DockerSpawner.allowed_images can be a callable (e.g. a Python function) that returns the list of allowed images.
This is the source code for DockerSpawner in case you want to look at how
allowed_images is used: