You can modify the command in your Dockerfile, e.g.

FROM jupyter/scipy-notebook:c8797824e8c0
ADD preflight.sh
CMD ['preflight.sh']

where preflight.sh is something like:

#!/usr/bin/env bashecho 'hello! I'm about to start'

# your setup code here

# your script should end with this:
exec jupyterhub-singleuser $@

-Min
​

On Tue, Aug 22, 2017 at 11:35 PM, <[email protected]> wrote:

> My jupyterhub runs under single-user mode. Every user has a container
> running jupyter notebook. I need to exec a shell command when the container
> starts up.
>
> There might be so configuration in jupyterhub_config.py.
> like:
> #jupyterhub_config.py
> c = get_config()
> ...
> c.DockerSpawner
> 在此输入代码...
>
> But I don't know exactly what the keys are.
>
> Thanks in advance!
>
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jupyter/7c2fc6bd-7b60-46dd-9f1d-25d7beb8e99a%40googlegroups.com
> <https://groups.google.com/d/msgid/jupyter/7c2fc6bd-7b60-46dd-9f1d-25d7beb8e99a%40googlegroups.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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAHNn8BVprnvbqwm5m9iOHoQYc2e0KbQfy-2P6u%2BToAHV4TirDA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to