Skip to content

Commit

Permalink
documentation update on postStart hook use
Browse files Browse the repository at this point in the history
  • Loading branch information
k-popov committed Nov 11, 2024
1 parent fc323db commit c64dc33
Showing 1 changed file with 6 additions and 0 deletions.
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 mentining 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

0 comments on commit c64dc33

Please sign in to comment.