JupyterHub SwarmSpawner with NFS persisent storage - is this expected to work?

I have deployed JupyterHub to docker-swarm using swarmspawner.
I have also configured LDAP/AD authentication and I have the users NFS home directory mounted to the host VM and shared to the notebook container via a bind mount.

So far so good … but now Jupyter cannot write to the mounted directory /home/joyvan/work.

This is expected since in the container Jupyter is running as user joyvan (uid=1000, gid=100) but the storage has the uid/gid of the external AD user.

I’ve searched a lot but not found an answer to this. This maybe poor searching on my side!

My question(s)

  • is it expected that persistent storage via bind mounts to the docker container is expected to work?
  • if so … how would I map the external uid/gid to the joyvan uid/gid?
  • any alternative suggestions as to how to NFS persistent storage with docker based Jupyter notebooks?

Any help or pointers gratefully received!

You should be able to run your Jupyter singleuser server as the correct UID, you can even switch the username to match. For example see