On Wed, Sep 14, 2016 at 4:23 PM, Kenneth Tran <o...@kentran.net> wrote:


>    1. How can I map `/home/user` in the container to
>    `some_directory/user` in the host server?
>
> Assuming you are using DockerSpawner, you would use:

c.DockerSpawner.volumes = {
    '/some_directory/{username}': 'in_container/mountpoint'
}

{username} will be replaced with the user’s name.


>    1. How to automatically create `some_directory/user` and run some init
>    script when a user first signs in?
>
> If you subclass Authenticator, the .add_user method is called when new
users are added. You can ensure the directory is created at this point.
Alternately, you can do this in your Spawner in start by ensuring the
directory exists and has the right ownership prior to launching the
container.

-Min


> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jupyter/CAHmx4LDFyBChuP0jppphcARa5vk2sy8XzEK%2Be4JXRDydOwMf4Q%
> 40mail.gmail.com
> <https://groups.google.com/d/msgid/jupyter/CAHmx4LDFyBChuP0jppphcARa5vk2sy8XzEK%2Be4JXRDydOwMf4Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
​

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAHNn8BW03jL64gVG-rp3i71ZPnJny4gv%2BGSVqvxHqbGQp8BbLQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to