Skip to content
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

documentation update on postStart hook use #3573

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/source/jupyterhub/customizing/user-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,12 @@ container, meaning that commands that place files relative to `./` will result
in users seeing those files in their home directory. You can use commands like
`wget` to place files where you like.

It's also worth mentioning that Kubernetes PostStart hook is
[executed asynchronously](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#hook-handler-execution).
This means there is no guarantee that the hook will execute before the container
ENTRYPOINT. This makes postStart hook unusable if some initialization must complete
before the user server start. For these cases a [custom command](#set-cmd) may be used.

A simple way to populate the notebook user's home directory is to add the
required files to the container's `/tmp` directory and then copy them to
`/home/jovyan` using a `postStart` hook. This example shows the use of
Expand Down