-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Persistent user storage accross containers and container-recreates #35
Comments
Thanks @TimoRoth. Yes the Other plugins can enable storage, which is for example the case of the plasma plugin: This could also be done by adding a Do you think there would be value in having a default storage as part of the |
I have come up with this in my custom config to achieve pretty much what I wanted by now:
The mounts option depend on a PR to dockerspawner: jupyterhub/dockerspawner#373 |
Since this seems like a case a lot of people would want, it might be worth it to document that option somewhere, so someone else does not need to go on a long search for it like I did. But generally it's possible already, so the issue can probably be closed. Edit: Just noticed that's my other PR, not this issue. No, that PR is entirely unneeded. I found out after that PR that you can use templates in volumes and mounts, making everything the PR does unnecessary. |
Thanks @TimoRoth.
Would you like to open a PR to add that to the README? |
I used tljh-repo2docker for a course (mainly on git) and first I'd like to say that this plugin for TLJH is terrific! It makes it so easy to set up TLJH with multiple environments and in particular it's the simplest way I found to provide access to RStudio for multiple people. So thanks for your work! Now to my point on this issue: my course is in two parts over two weeks and I was surprised to see that the changes made last week were ephemeral, hence my tumbling across this issue. In this case it's not a problem and ok to start from scratch, but it might be an issue for others and I guess it should be stated clearly in the README. Also I'd appreciate some explanations in the README on how to provide permanent storage. I don't think it makes sense to make it default because it can also be useful to start with a clean slate every time, but having directions might help! Unfortunately I don't have the required competence to add such information, but maybe by reviving this issue, one of you will provide an update. I could just try some of the info provided above but it would be nice to understand a bit more. Thanks! |
can I know where is |
It's a docker volume. So normally, docker will store it somewhere in its data dir, which is normally at /var/lib/docker. |
Right now, a users /home/jovyan is stored inside their respective container.
What that means is that if a user wants to update their base image, or use an entirely different one, they're going to lose all their data.
The most obvious solution for this to me is:
For every user, create a "storage-$USERNAME" container from a configured, very basic, nearly empty image, that has /home/jovyan as a volume.
Then create every users actual containers with "--volumes-from storage-$USERNAME".
The text was updated successfully, but these errors were encountered: