Better style

This commit is contained in:
Ayaz Salikhov
2022-01-27 21:10:06 +03:00
committed by GitHub
parent 33db75ed46
commit 36d468626a

View File

@@ -23,15 +23,15 @@ docker run -d -p 8888:8888 jupyter/base-notebook start-notebook.sh --NotebookApp
## Docker Options ## Docker Options
You may instruct the `start-notebook.sh` script to customize the container environment before launching the notebook server. You do so by passing You may instruct the `start-notebook.sh` script to customize the container environment before launching the notebook server.
arguments to the `docker run` command. You do so by passing arguments to the `docker run` command.
- `-e NB_USER=<username>` - The desired username and associated home folder. Default value is `jovyan`. Setting `NB_USER` refits the `jovyan` - `-e NB_USER=<username>` - The desired username and associated home folder. Default value is `jovyan`. Setting `NB_USER` refits the `jovyan`
default user and ensures that the desired user has the correct file permissions for the new home directory that gets created at default user and ensures that the desired user has the correct file permissions for the new home directory that gets created at
`/home/<username>`. For this option to take effect you must run the container with `--user root`, set the working directory `-w "/home/${NB_USER}"` `/home/<username>`. For this option to take effect you must run the container with `--user root`, set the working directory `-w "/home/${NB_USER}"`
and set the environment variable `-e CHOWN_HOME=yes`. and set the environment variable `-e CHOWN_HOME=yes`.
Example Usage: Example usage:
```bash ```bash
docker run --rm -it -p 8888:8888 -e NB_USER="my-username" -e CHOWN_HOME=yes -w "/home/${NB_USER}" --user root jupyter/base-notebook:latest docker run --rm -it -p 8888:8888 -e NB_USER="my-username" -e CHOWN_HOME=yes -w "/home/${NB_USER}" --user root jupyter/base-notebook:latest
@@ -39,7 +39,7 @@ arguments to the `docker run` command.
- `-e NB_UID=<numeric uid>` - Instructs the startup script to switch the numeric user ID of `${NB_USER}` to the given value. Default value is `1000`. - `-e NB_UID=<numeric uid>` - Instructs the startup script to switch the numeric user ID of `${NB_USER}` to the given value. Default value is `1000`.
This feature is useful when mounting host volumes with specific owner permissions. For this option to take effect, you must run the container This feature is useful when mounting host volumes with specific owner permissions. For this option to take effect, you must run the container
with `--user root`. (The startup script will `su ${NB_USER}` after adjusting the user ID.) You might consider using the modern Docker options with `--user root`. (The startup script will `su ${NB_USER}` after adjusting the user ID.) You might consider using modern Docker options
`--user` and `--group-add` instead. See bullet points regarding `--user` and `--group-add`. `--user` and `--group-add` instead. See bullet points regarding `--user` and `--group-add`.
- `-e NB_GID=<numeric gid>` - Instructs the startup script to change the primary group of`${NB_USER}` to `${NB_GID}` - `-e NB_GID=<numeric gid>` - Instructs the startup script to change the primary group of`${NB_USER}` to `${NB_GID}`